mirror of
https://github.com/google/brotli.git
synced 2026-09-23 23:24:59 +00:00
Dereference of a null pointer #272
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @QiAnXinCodeSafe on GitHub (Mar 7, 2019).
9cd01c0437/c/enc/encode.c (L1099-L1103)in line1099, storage may initialized to a null pointer value, because in GetBrotliStorage(), in line196( if (BROTLI_IS_OOM(m)) return NULL; ), and dereference of a null ponter in line 1102.
9cd01c0437/c/enc/encode.c (L191-L200)@eustas commented on GitHub (Mar 7, 2019):
Hello. Thanks for reporting, but that is a "false positive".
Once
BROTLI_IS_OOMreturnsfalse, it will returnfalseever after (or crash the app in the first place, depends on compilation options).So, if in line 1099
NULLis returned, then line 1102 can not be reached (because of the check in line 1101).