~ubuntu-branches/ubuntu/raring/libav/raring-security

« back to all changes in this revision

Viewing changes to debian/patches/post-0.7.1/0034-h264-correct-the-check-for-invalid-long-term-frame-i.patch

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2011-09-28 09:18:34 UTC
  • mfrom: (1.3.7 sid)
  • Revision ID: package-import@ubuntu.com-20110928091834-w415mnuh06h4zpvc
Tags: 4:0.7.1-7ubuntu2
Revert "Convert package to include multiarch support."

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From 8ad6555f820cc8db5debd5f76d8779cd329def20 Mon Sep 17 00:00:00 2001
 
2
From: Jeff Downs <heydowns@somuchpressure.net>
 
3
Date: Tue, 5 Jul 2011 14:21:54 -0400
 
4
Subject: [PATCH 34/70] h264: correct the check for invalid long term frame index in MMCO decode
 
5
 
 
6
The current check on MMCO parameters prohibits a "max long term frame index
 
7
plus 1" of 16 (frame idx of 15) for the "set max long term frame index" MMCO.
 
8
Fix this off-by-one error to allow the full range of legal values.
 
9
 
 
10
Signed-off-by: Diego Biurrun <diego@biurrun.de>
 
11
(cherry picked from commit 29a09eae9a827f4dbc9c4517180d8fe2ecef321a)
 
12
 
 
13
Signed-off-by: Anton Khirnov <anton@khirnov.net>
 
14
---
 
15
 libavcodec/h264_refs.c |    2 +-
 
16
 1 files changed, 1 insertions(+), 1 deletions(-)
 
17
 
 
18
diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c
 
19
index a025f7d..b1c27ec 100644
 
20
--- a/libavcodec/h264_refs.c
 
21
+++ b/libavcodec/h264_refs.c
 
22
@@ -678,7 +678,7 @@ int ff_h264_decode_ref_pic_marking(H264Context *h, GetBitContext *gb){
 
23
                 }
 
24
                 if(opcode==MMCO_SHORT2LONG || opcode==MMCO_LONG2UNUSED || opcode==MMCO_LONG || opcode==MMCO_SET_MAX_LONG){
 
25
                     unsigned int long_arg= get_ue_golomb_31(gb);
 
26
-                    if(long_arg >= 32 || (long_arg >= 16 && !(opcode == MMCO_LONG2UNUSED && FIELD_PICTURE))){
 
27
+                    if(long_arg >= 32 || (long_arg >= 16 && !(opcode == MMCO_SET_MAX_LONG && long_arg == 16) && !(opcode == MMCO_LONG2UNUSED && FIELD_PICTURE))){
 
28
                         av_log(h->s.avctx, AV_LOG_ERROR, "illegal long ref in memory management control operation %d\n", opcode);
 
29
                         return -1;
 
30
                     }
 
31
-- 
 
32
1.7.4.1
 
33