Improved filtering of input for fuzzershell for modes other than generic.
FossilOrigin-Name: 025e8370dde2918b66683f8d7fa9c7d23d03c9b4
This commit is contained in:
parent
3fb2cc1173
commit
0ba51089c8
12
manifest
12
manifest
@ -1,5 +1,5 @@
|
||||
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
|
||||
C Improved\sfiltering\sof\sinput\sfor\sfuzzershell\sfor\smodes\sother\sthan\sgeneric.
|
||||
D 2015-04-22T13:16:46.644
|
||||
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 f9aa24371ce48b3a1c215eb0a9668936a7b64896
|
||||
F tool/fuzzershell.c bcdca60b54654c8fc25fd215953d9b6bb55fd7d4
|
||||
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 2cb945116e7a5b78741b19839899826b539d5868
|
||||
R 71e4a500a938155e198d8a588c679f56
|
||||
P 1cceefa7c6585bca786fe9f7118f7beb829ad709
|
||||
R cbbdf393d38b0307d153eda6dc2aba63
|
||||
U drh
|
||||
Z e9086986aed5a59c4a7252a09fff7a6a
|
||||
Z 11145234dd05700bee32abe646d63f11
|
||||
|
@ -1 +1 @@
|
||||
1cceefa7c6585bca786fe9f7118f7beb829ad709
|
||||
025e8370dde2918b66683f8d7fa9c7d23d03c9b4
|
@ -351,6 +351,7 @@ int main(int argc, char **argv){
|
||||
char *zSql; /* SQL to run */
|
||||
char *zToFree = 0; /* Call sqlite3_free() on this afte running zSql */
|
||||
int iMode = FZMODE_Generic; /* Operating mode */
|
||||
const char *zCkGlob = 0; /* Inputs must match this glob */
|
||||
|
||||
|
||||
g.zArgv0 = argv[0];
|
||||
@ -392,12 +393,16 @@ int main(int argc, char **argv){
|
||||
z = argv[++i];
|
||||
if( strcmp(z,"generic")==0 ){
|
||||
iMode = FZMODE_Printf;
|
||||
zCkGlob = 0;
|
||||
}else if( strcmp(z, "glob")==0 ){
|
||||
iMode = FZMODE_Glob;
|
||||
zCkGlob = "'*','*'";
|
||||
}else if( strcmp(z, "printf")==0 ){
|
||||
iMode = FZMODE_Printf;
|
||||
zCkGlob = "'*',*";
|
||||
}else if( strcmp(z, "strftime")==0 ){
|
||||
iMode = FZMODE_Strftime;
|
||||
zCkGlob = "'*',*";
|
||||
}else{
|
||||
abendError("unknown --mode: %s", z);
|
||||
}
|
||||
@ -487,7 +492,7 @@ 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 ){
|
||||
if( zCkGlob && sqlite3_strglob(zCkGlob,&zIn[i])!=0 ){
|
||||
zIn[iNext] = cSaved;
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user