diff --git a/src/passbook.c b/src/passbook.c index 9f58f152e07f184181b7a86e2c2bef996ec724eb..39589184c4c12ca191f0954261ef1fa9f72b1b3a 100644 --- a/src/passbook.c +++ b/src/passbook.c @@ -474,15 +474,16 @@ static int execute(void){ if (numToks != 2){ return -1; } + // when fuzzing (or gathering coverage stats, etc.) don't check master pw +#ifndef PASSBOOK_FUZZ const char * pass = getpass("Enter master password: "); if (pass == NULL || strcmp(pass,toks[1]) != 0){ fprintf(stderr,"Master password incorrect!\n"); -#ifdef PASSBOOK_FUZZ // actually don't exit but keep going when fuzzing - return -1; -#else exit(1); // exit immediately -#endif } +#else + return -1; +#endif } else if (strcmp(toks[0],INSTRUCTION_LIST) == 0){ if (numToks != 1){