mirror of https://github.com/google/oss-fuzz.git
[mpg123] silence library error messages (#2642)
* mpg123/read_fuzzer: disable error messages from libmpg123 This shall remove any error messages libmpg123 prints out during fuzzing, leaving only the crash trace at the inevitable end.
This commit is contained in:
parent
6c0fcaf1b2
commit
0a100f4c1c
|
@ -19,7 +19,9 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
ret = mpg123_open_feed(handle);
|
||||
ret = mpg123_param(handle, MPG123_ADD_FLAGS, MPG123_QUIET, 0.);
|
||||
if(ret == MPG123_OK)
|
||||
ret = mpg123_open_feed(handle);
|
||||
if (ret != MPG123_OK) {
|
||||
mpg123_delete(handle);
|
||||
return 0;
|
||||
|
|
|
@ -63,7 +63,8 @@ int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
|||
|
||||
int error;
|
||||
mpg123_handle* handle = mpg123_new(NULL, &error);
|
||||
if (handle == NULL) {
|
||||
if (handle == NULL || mpg123_param(handle,
|
||||
MPG123_ADD_FLAGS, MPG123_QUIET, 0.) != MPG123_OK) {
|
||||
free(outmemory);
|
||||
fuzzer_release_tmpfile(filename);
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue