diff options
author | Xi Wang <xi.wang@gmail.com> | 2013-01-22 20:58:07 -0500 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-03-20 22:02:28 +0100 |
commit | a31be9dd065bc294c214dfaad9abd08fe3919569 (patch) | |
tree | 710bc67285697759481d4d8c6197b8eb11c147c2 /libavdevice | |
parent | b63dbe2220211fc8e9c0dc230dd024d34e5f3c6f (diff) | |
download | ffmpeg-a31be9dd065bc294c214dfaad9abd08fe3919569.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: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2f014567cfd63e58156f60666f1a61ba147276ab)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavdevice')
0 files changed, 0 insertions, 0 deletions