projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
417927a
)
hdsenc: Fix an off by one error in an array size check
author
Michael Niedermayer
<michaelni@gmx.at>
Wed, 11 Dec 2013 19:17:23 +0000
(20:17 +0100)
committer
Martin Storsjö
<martin@martin.st>
Sat, 14 Dec 2013 15:48:42 +0000
(17:48 +0200)
Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/hdsenc.c
patch
|
blob
|
history
diff --git
a/libavformat/hdsenc.c
b/libavformat/hdsenc.c
index ea6e77c041f2e0e35af4f919235207adf020e6d5..c0932933d4139489ae03f75d43c4fed5b12bbdc1 100644
(file)
--- 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);