mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2025-12-19 15:47:40 +03:00
## Problem `getSpineIndexForTocIndex()` and `getTocIndexForSpineIndex()` access `toc[tocIndex]` and `spine[spineIndex]` without validating indices are within bounds. Malformed EPUBs or edge cases could trigger out-of-bounds access. ## Fix Added bounds validation at the start of both functions before accessing the arrays. ## Testing - Builds successfully with `pio run` - Affects: `lib/Epub/Epub.cpp` |
||
|---|---|---|
| .. | ||
| Epub | ||
| Epub.cpp | ||
| Epub.h | ||