summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <[email protected]>2016-08-19 23:54:28 +0200
committerMichael Niedermayer <[email protected]>2016-08-25 03:29:36 +0200
commit8003a5d23792d79187e5f99be55c518e997bc1fd (patch)
tree06aece8b96715633101468740270f05c9c24e162
parentec30a498e66a6498c3c5045244aec9a38d41799e (diff)
avcodec/h2645_parse: fix nal size
Found-by: <durandal_1707> Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit 15dd56c093be480e719d7bbc39f8dbddb586694d) Signed-off-by: Michael Niedermayer <[email protected]>
-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);