fixed uaf and warnings

This commit is contained in:
Dominik Maier
2020-04-13 16:57:19 +02:00
parent dda096da03
commit 326ab632c3
12 changed files with 34 additions and 24 deletions

View File

@ -535,7 +535,7 @@ u8 save_if_interesting(afl_state_t *afl, void *mem, u32 len, u8 fault) {
if (unlikely(len == 0)) return 0;
u8 *queue_fn = "";
u8 hnb;
u8 hnb = '\0';
s32 fd;
u8 keeping = 0, res;
@ -718,9 +718,9 @@ u8 save_if_interesting(afl_state_t *afl, void *mem, u32 len, u8 fault) {
// if the user wants to be informed on new crashes - do that
#if !TARGET_OS_IPHONE
if (system(afl->infoexec) == -1)
hnb += 0; // we dont care if system errors, but we dont want a
// compiler warning either
// we dont care if system errors, but we dont want a
// compiler warning either
(void)(system(afl->infoexec)+1);
#else
WARNF("command execution unsupported");
#endif