[ENOMEM] fix access to unitialized memory.

If the serialize() call fails to write the object then we can't safely read varstore_prime fields. Fixes https://oss-fuzz.com/testcase-detail/5137462782066688.
This commit is contained in:
Garret Rieger committed 2020-09-02 11:01:07 -07:00
1 parent 45de128930
commit 9825e3dd2e
2 files changed
+4 -1

No files matched your search

+4 -1
View File
@@ -2537,7 +2537,10 @@ struct VariationStore
for (unsigned i = 0; i < inner_maps.length; i++)
inner_maps[i].fini ();
return_trace (bool (varstore_prime->dataSets));
return_trace (
!c->serializer->in_error()
&& varstore_prime->dataSets);
}
unsigned int get_region_index_count (unsigned int ivs) const