]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Change the printf, strftime, and glob modes of fuzzershell so that they
authordrh <drh@noemail.net>
Wed, 22 Apr 2015 11:16:34 +0000 (11:16 +0000)
committerdrh <drh@noemail.net>
Wed, 22 Apr 2015 11:16:34 +0000 (11:16 +0000)
reject all inputs that do not start with a string literal followed by a
comma.  This helps the fuzzer focus in on the kinds of behavior those modes
are intended to test.

FossilOrigin-Name: 1cceefa7c6585bca786fe9f7118f7beb829ad709

manifest
manifest.uuid
tool/fuzzershell.c

index f62c28390317fa54df7318114418d99ca88c3944..92e2149ed45c962c912444dec2c92aa027014bb8 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C When\scompiling\sfor\sUAP,\slink\sagainst\sthe\snew\sminimal\sMSVC\sruntime.
-D 2015-04-22T01:33:53.959
+C Change\sthe\sprintf,\sstrftime,\sand\sglob\smodes\sof\sfuzzershell\sso\sthat\sthey\nreject\sall\sinputs\sthat\sdo\snot\sstart\swith\sa\sstring\sliteral\sfollowed\sby\sa\ncomma.\s\sThis\shelps\sthe\sfuzzer\sfocus\sin\son\sthe\skinds\sof\sbehavior\sthose\smodes\nare\sintended\sto\stest.
+D 2015-04-22T11:16:34.611
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in faaf75b89840659d74501bea269c7e33414761c1
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -1204,7 +1204,7 @@ F tool/diffdb.c 7524b1b5df217c20cd0431f6789851a4e0cb191b
 F tool/extract.c 054069d81b095fbdc189a6f5d4466e40380505e2
 F tool/fast_vacuum.c 5ba0d6f5963a0a63bdc42840f678bad75b2ebce1
 F tool/fragck.tcl 5265a95126abcf6ab357f7efa544787e5963f439
-F tool/fuzzershell.c 00c12b1e95095f43980ae3cafb51938eda577fe2
+F tool/fuzzershell.c f9aa24371ce48b3a1c215eb0a9668936a7b64896
 F tool/genfkey.README cf68fddd4643bbe3ff8e31b8b6d8b0a1b85e20f4
 F tool/genfkey.test 4196a8928b78f51d54ef58e99e99401ab2f0a7e5
 F tool/getlock.c f4c39b651370156cae979501a7b156bdba50e7ce
@@ -1252,7 +1252,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 623ddbdbf48d26dac58c593bcb9e7b184334ddfc
-R 647b9c5f348c3c64b56250400a815823
-U mistachkin
-Z 2676785d203eabdaf7fb118930189562
+P 2cb945116e7a5b78741b19839899826b539d5868
+R 71e4a500a938155e198d8a588c679f56
+U drh
+Z e9086986aed5a59c4a7252a09fff7a6a
index 9362726267d8c328c7c37b17f244d6995efa9f7e..d86acf85ffa022e7c086421bb572e9cfe2f0ddab 100644 (file)
@@ -1 +1 @@
-2cb945116e7a5b78741b19839899826b539d5868
\ No newline at end of file
+1cceefa7c6585bca786fe9f7118f7beb829ad709
\ No newline at end of file
index abdfd3ff00e1025a547f259b1c17c67356093b49..c142a32c65ef8240152628b1b9219b241e7905ee 100644 (file)
@@ -485,7 +485,12 @@ int main(int argc, char **argv){
       }
     }
     for(iNext=i; iNext<nIn && strncmp(&zIn[iNext],"/****<",6)!=0; iNext++){}
-    
+    cSaved = zIn[iNext];
+    zIn[iNext] = 0;
+    if( iMode!=FZMODE_Generic && sqlite3_strglob("'*',*",&zIn[i])!=0 ){
+      zIn[iNext] = cSaved;
+      continue;
+    }
     rc = sqlite3_open_v2(
       "main.db", &db,
       SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_MEMORY,
@@ -514,8 +519,6 @@ int main(int argc, char **argv){
     if( zEncoding ) sqlexec(db, "PRAGMA encoding=%s", zEncoding);
     if( pageSize ) sqlexec(db, "PRAGMA pagesize=%d", pageSize);
     if( doAutovac ) sqlexec(db, "PRAGMA auto_vacuum=FULL");
-    cSaved = zIn[iNext];
-    zIn[iNext] = 0;
     printf("INPUT (offset: %d, size: %d): [%s]\n",
             i, (int)strlen(&zIn[i]), &zIn[i]);
     zSql = &zIn[i];