mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-06-25 14:23:15 +02:00
b655cfefafd565590bfc5976b9ce8dd141b3c41c
The following error handling is broken due to signedness. int file_size; uint32_t tag_bytes; int64_t tag_start; ... tag_start = file_size - tag_bytes - APE_TAG_FOOTER_BYTES; if (tag_start < 0) { ... } Note that tag_bytes is unsigned, which makes the right-hand side of `tag_start = ...' unsigned, too. The 32-bit unsigned value is then zero-extended to 64 bits. Therefore, tag_start must be non-negative, and the check (tag_start < 0) is always false, which breaks the error handling. This patch fixes the check. Signed-off-by: Xi Wang <xi.wang@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
Libav README ------------ 1) Documentation ---------------- * Read the documentation in the doc/ directory. 2) Licensing ------------ * See the LICENSE file.
Languages
C
90.1%
Assembly
8%
Makefile
1.3%
C++
0.2%
Objective-C
0.1%
Other
0.1%