Browse Source

hdsenc: Fix an off by one error in an array size check

Signed-off-by: Martin Storsjö <martin@martin.st>
tags/n2.2-rc1
Michael Niedermayer Martin Storsjö 12 years ago
parent
commit
b8ed15d637
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/hdsenc.c

+ 1
- 1
libavformat/hdsenc.c View File

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


Loading…
Cancel
Save