mirror of https://github.com/google/oss-fuzz.git
Avoid calling strlen on uninitialized data (#6747)
GetINCHIfromINCHI calls strlen on szOptions, which leads to undefined behavior as it's not a valid null-terminated byte string. Explicitly NULL out the char* to avoid this.
This commit is contained in:
parent
ed02a7d820
commit
dfaf20a5e2
|
@ -40,6 +40,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
|||
|
||||
inchi_InputINCHI inpInChI;
|
||||
inpInChI.szInChI = szINCHISource;
|
||||
inpInChI.szOptions = NULL;
|
||||
|
||||
inchi_Output out;
|
||||
GetINCHIfromINCHI(&inpInChI, &out);
|
||||
|
|
Loading…
Reference in New Issue