summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264-correct-ref-count-check-and-limit-fix-out-of-ar.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264-correct-ref-count-check-and-limit-fix-out-of-ar.patch')
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264-correct-ref-count-check-and-limit-fix-out-of-ar.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264-correct-ref-count-check-and-limit-fix-out-of-ar.patch b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264-correct-ref-count-check-and-limit-fix-out-of-ar.patch
new file mode 100644
index 0000000000..d4f55b2696
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gst-ffmpeg-0.10.13/0001-h264-correct-ref-count-check-and-limit-fix-out-of-ar.patch
@@ -0,0 +1,29 @@
1From d6c184880ee2e09fd68c0ae217173832cee5afc1 Mon Sep 17 00:00:00 2001
2From: Michael Niedermayer <michaelni@gmx.at>
3Date: Sun, 18 Nov 2012 16:29:04 +0100
4Subject: [PATCH] h264: correct ref count check and limit, fix out of array
5 accesses.
6
7Upstream-Status: Backport
8
9Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
10Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11---
12 libavcodec/h264.c | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/libavcodec/h264.c b/libavcodec/h264.c
16index da43f1e..32cede5 100644
17--- a/gst-libs/ext/libav/libavcodec/h264.c
18+++ b/gst-libs/ext/libav/libavcodec/h264.c
19@@ -2870,6 +2870,9 @@ static int decode_slice_header(H264Conte
20 h->ref_count[0]= get_ue_golomb(&s->gb) + 1;
21 if(h->slice_type_nos==AV_PICTURE_TYPE_B)
22 h->ref_count[1]= get_ue_golomb(&s->gb) + 1;
23+ else
24+ // full range is spec-ok in this case, even for frames
25+ h->ref_count[1] = 1;
26
27 if(h->ref_count[0]-1 > 32-1 || h->ref_count[1]-1 > 32-1){
28 av_log(h->s.avctx, AV_LOG_ERROR, "reference overflow\n");
29--