mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-04 14:47:37 +03:00
## Problem `readFileToMemory()` allocates an output buffer via `malloc()` at line 120 but doesn't check if allocation succeeds. On low memory, the NULL pointer is passed to `fread()` causing a crash. ## Fix Add NULL check after `malloc()` for the output buffer. Follows the existing pattern already used for `deflatedData` at line 141. Changed `lib/ZipFile/ZipFile.cpp`. ## Test - Follows existing validated pattern from same function - Defensive addition only - no logic changes |
||
|---|---|---|
| .. | ||
| ZipFile.cpp | ||
| ZipFile.h | ||