diff options
author | Xi Wang <xi.wang@gmail.com> | 2013-01-22 17:49:29 -0500 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-03-20 22:02:28 +0100 |
commit | dd646260228350f3292cc06357111b4a3863c6e5 (patch) | |
tree | e876f73a1294b66b77cc0ce73a1c4449598ccca6 /libavdevice | |
parent | a31be9dd065bc294c214dfaad9abd08fe3919569 (diff) | |
download | ffmpeg-dd646260228350f3292cc06357111b4a3863c6e5.tar.gz |
rtmp: fix multiple broken overflow checks
Sanity checks like `data + size >= data_end || data + size < data' are
broken, because `data + size < data' assumes pointer overflow, which is
undefined behavior in C. Many compilers such as gcc/clang optimize such
checks away.
Use `size < 0 || size >= data_end - data' instead.
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 902cfe2f74d777a7dc20ac68f2393b9f84b790c1)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavdevice')
0 files changed, 0 insertions, 0 deletions