diff options
author | Xi Wang <xi.wang@gmail.com> | 2013-01-22 20:58:07 -0500 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2013-01-23 13:51:29 +0200 |
commit | cf29f49d8ae00bb153c24b5c8a8f6cb150a91de8 (patch) | |
tree | 8aa856c0dee1acd12df604bfb49792405bec66f9 /libavutil | |
parent | ecb918e5f0a4395468862b5fbd11a51de9be3d4f (diff) | |
download | ffmpeg-streaming-cf29f49d8ae00bb153c24b5c8a8f6cb150a91de8.zip ffmpeg-streaming-cf29f49d8ae00bb153c24b5c8a8f6cb150a91de8.tar.gz |
rtpenc: fix overflow checking in avc_mp4_find_startcode()
The check `start + res < start' is broken since pointer overflow is
undefined behavior in C. Many compilers such as gcc/clang optimize
away this check.
Use `res > end - start' instead. Also change `res' to unsigned int
to avoid signed left-shift overflow.
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavutil')
0 files changed, 0 insertions, 0 deletions