Skip to content

Commit

Permalink
Corrected if condition boolean logic when fuzzing
Browse files Browse the repository at this point in the history
  • Loading branch information
jfoug committed Sep 10, 2016
1 parent 9037a83 commit 2684366
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/as400_ssha1_fmt_plug.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ static int our_valid(char *ciphertext, struct fmt_main *self)
if (options.input_enc == UTF_8 && !valid_utf8((UTF8*)ciphertext)) {
static int error_shown = 0;
#ifdef HAVE_FUZZ
if (options.flags & (FLG_FUZZ_CHK || options.flags & FLG_FUZZ_DUMP_CHK))
if (options.flags & (FLG_FUZZ_CHK | FLG_FUZZ_DUMP_CHK))
return 0;
#endif
if (!error_shown)
Expand Down
4 changes: 2 additions & 2 deletions src/mscash_common_plug.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ int mscash1_common_valid(char *ciphertext, struct fmt_main *self)
if (saltlen < 0) {
static int error_shown = 0;
#ifdef HAVE_FUZZ
if (options.flags & (FLG_FUZZ_CHK || options.flags & FLG_FUZZ_DUMP_CHK))
if (options.flags & (FLG_FUZZ_CHK | FLG_FUZZ_DUMP_CHK))
return 0;
#endif
if (!error_shown)
Expand Down Expand Up @@ -303,7 +303,7 @@ int mscash2_common_valid(char *ciphertext, int max_salt_length, struct fmt_main
if (saltlen < 0) {
static int error_shown = 0;
#ifdef HAVE_FUZZ
if (options.flags & (FLG_FUZZ_CHK || options.flags & FLG_FUZZ_DUMP_CHK))
if (options.flags & (FLG_FUZZ_CHK | FLG_FUZZ_DUMP_CHK))
return 0;
#endif
if (!error_shown)
Expand Down
2 changes: 1 addition & 1 deletion src/o3logon_fmt_plug.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ static int valid(char *ciphertext, struct fmt_main *self)
if (len < 0 || (len == 0 && cp-ciphertext)) {
static int error_shown = 0;
#ifdef HAVE_FUZZ
if (options.flags & (FLG_FUZZ_CHK || options.flags & FLG_FUZZ_DUMP_CHK))
if (options.flags & (FLG_FUZZ_CHK | FLG_FUZZ_DUMP_CHK))
return 0;
#endif
if (!error_shown)
Expand Down
2 changes: 1 addition & 1 deletion src/oracle_fmt_plug.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ static int valid(char *ciphertext, struct fmt_main *self)
if (len < 0) {
static int error_shown = 0;
#ifdef HAVE_FUZZ
if (options.flags & (FLG_FUZZ_CHK || options.flags & FLG_FUZZ_DUMP_CHK))
if (options.flags & (FLG_FUZZ_CHK | FLG_FUZZ_DUMP_CHK))
return 0;
#endif
if (!error_shown)
Expand Down

0 comments on commit 2684366

Please sign in to comment.