Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
If cdf_count_chain() is called with sid < 0, then we end up returning zero length, which in turn leads to calloc() calls for 0 bytes in cdf_read_long_sector_chain(), cdf_read_short_sector_chain() and cdf_read_ssat(). Depending on calloc() implementation we can end up returning -1 or 0 from those. As negative sid is probably wrong case anyway, it might be better to always return -1. Issue found by clang static analysis.
- Loading branch information