More paranoid input checks, random error injection

Check for NULL input data buffers and set values to NULL after freeing()
local variables to avoid memory corruption on use-after-freee.

Add lots of error injection in the host testing to help find bugs on
the PC where they're easier to debug.
This commit is contained in:
Earle F. Philhower, III committed 2018-01-20 21:08:13 -08:00
1 parent f16cd2b269
commit d04beb1105
3 files changed
+27 -3

No files matched your search

+1 -1
View File
@@ -56,7 +56,7 @@ bool AudioFileSourceICYStream::open(const char *url)
}
icyByteCount = 0;
size = http.getSize();
free(saveURL);
free(saveURL); saveURL = NULL;
saveURL = strdup(url);
return true;
}