Roman I Khimov:
authorChristos Zoulas <christos@zoulas.com>
Tue, 13 May 2014 16:41:06 +0000 (16:41 +0000)
committerChristos Zoulas <christos@zoulas.com>
Tue, 13 May 2014 16:41:06 +0000 (16:41 +0000)
commit961f3849dd0ed90dd658a7126cc0f1c91d6e4bcf
tree7bd1589a7004ff44cabf61ccdff8ff757ea7b9b8
parent2d1b6fd83bc444b3fdb8910b7b4045aec190b1eb
Roman I Khimov:
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.
src/cdf.c