diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2011-06-15 20:21:33 +0200 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2011-06-15 20:21:33 +0200 |
commit | 7f2228dbfec0268b8b486573041043c0de1aa381 (patch) | |
tree | 144544dc5293649c7da84064d73195ff00ef9648 | |
parent | c940c31c88494c6accbdb0df3b715bd1f161368f (diff) | |
download | ffmpeg-7f2228dbfec0268b8b486573041043c0de1aa381.tar.gz |
Make buffer size check consistent and avoid a possible overflow.
-rw-r--r-- | libavformat/rtpenc_h264.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/rtpenc_h264.c b/libavformat/rtpenc_h264.c index 0f8850ee77..11074d0d51 100644 --- a/libavformat/rtpenc_h264.c +++ b/libavformat/rtpenc_h264.c @@ -40,7 +40,7 @@ static const uint8_t *avc_mp4_find_startcode(const uint8_t *start, const uint8_t res = (res << 8) | *start++; } - if (res + start > end) { + if (end - start < res) { return NULL; } |