diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-12-11 20:17:23 +0100 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2013-12-14 17:48:42 +0200 |
commit | b8ed15d6378f00e158c72c526fa0fce17da77361 (patch) | |
tree | 0403167421bc5adede850182076bc43993759e7a /libavformat/hdsenc.c | |
parent | 417927af3c99bc17819995aa57ae05685deeace8 (diff) | |
download | ffmpeg-b8ed15d6378f00e158c72c526fa0fce17da77361.tar.gz |
hdsenc: Fix an off by one error in an array size check
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/hdsenc.c')
-rw-r--r-- | libavformat/hdsenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/hdsenc.c b/libavformat/hdsenc.c index ea6e77c041..c0932933d4 100644 --- a/libavformat/hdsenc.c +++ b/libavformat/hdsenc.c @@ -89,7 +89,7 @@ static int parse_header(OutputStream *os, const uint8_t *buf, int buf_size) if (size > buf_size) return AVERROR_INVALIDDATA; if (type == 8 || type == 9) { - if (os->nb_extra_packets > FF_ARRAY_ELEMS(os->extra_packets)) + if (os->nb_extra_packets >= FF_ARRAY_ELEMS(os->extra_packets)) return AVERROR_INVALIDDATA; os->extra_packet_sizes[os->nb_extra_packets] = size; os->extra_packets[os->nb_extra_packets] = av_malloc(size); |