mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 08:32:11 +01:00
Have different exit codes for errors vs exceptions
This commit is contained in:
1 parent
b1af7b9b41
commit
9cc2c25f3d
3 files changed
+61
-17
No files matched your search
@@ -56,9 +56,14 @@ static const char* llvmFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
||||
});
|
||||
|
||||
const char* msg = fuzz(&src, hash);
|
||||
if (msg && strstr(msg, "internal error:")) {
|
||||
fprintf(stderr, "internal errors shouldn't occur: \"%s\"\n", msg);
|
||||
intentional_segfault();
|
||||
if (msg) {
|
||||
if (strnlen(msg, 2047) >= 2047) {
|
||||
msg = "fuzzlib: internal error: error message is too long";
|
||||
}
|
||||
if (strstr(msg, "internal error:")) {
|
||||
fprintf(stderr, "internal errors shouldn't occur: \"%s\"\n", msg);
|
||||
intentional_segfault();
|
||||
}
|
||||
}
|
||||
return msg;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user