Browse Source

Make buffer size check consistent and avoid a possible overflow.

tags/n0.8
Reimar Döffinger 14 years ago
parent
commit
7f2228dbfe
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/rtpenc_h264.c

+ 1
- 1
libavformat/rtpenc_h264.c View File

@@ -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;
}



Loading…
Cancel
Save