summaryrefslogtreecommitdiffstats
path: root/libavcodec/h2645_parse.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-08-19 23:54:28 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2016-08-20 00:40:43 +0200
commit15dd56c093be480e719d7bbc39f8dbddb586694d (patch)
tree0ca98350ce5c8f915b9b249e1858a9ae393e9db8 /libavcodec/h2645_parse.c
parent528171ba84b24830b74d9c19dd957ac3609f7270 (diff)
downloadffmpeg-streaming-15dd56c093be480e719d7bbc39f8dbddb586694d.zip
ffmpeg-streaming-15dd56c093be480e719d7bbc39f8dbddb586694d.tar.gz
avcodec/h2645_parse: fix nal size
Found-by: <durandal_1707> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/h2645_parse.c')
-rw-r--r--libavcodec/h2645_parse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/h2645_parse.c b/libavcodec/h2645_parse.c
index 0059437..c3961a5 100644
--- a/libavcodec/h2645_parse.c
+++ b/libavcodec/h2645_parse.c
@@ -88,7 +88,8 @@ int ff_h2645_extract_rbsp(const uint8_t *src, int length,
nal->size =
nal->raw_size = length;
return length;
- }
+ } else if (i > length)
+ i = length;
av_fast_padded_malloc(&nal->rbsp_buffer, &nal->rbsp_buffer_size,
length + padding);
OpenPOWER on IntegriCloud