Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-08-20 00:54:28 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2016-08-20 01:40:43 +0300
commit15dd56c093be480e719d7bbc39f8dbddb586694d (patch)
tree0ca98350ce5c8f915b9b249e1858a9ae393e9db8 /libavcodec/h2645_parse.c
parent528171ba84b24830b74d9c19dd957ac3609f7270 (diff)
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 00594371c0..c3961a5e90 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);