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

« back to all changes in this revision

Viewing changes to debian/patches/post-0.7.1/0064-rv10-Reject-slices-that-does-not-have-the-same-type-.patch

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2011-10-01 00:22:07 UTC
  • mfrom: (1.3.8 sid)
  • Revision ID: package-import@ubuntu.com-20111001002207-tnxz39i0rwr5ufy9
Tags: 4:0.7.2-1ubuntu1
* Merge from debian, remaining changes:
  - don't build against libfaad, libdirac, librtmp and libopenjpeg,
    lame, xvid, x264  (all in universe)
  - not installing into multiarch directories
* This new upstream release has basically merged in all 70 patches that
  are present in 4:0.7.1-7ubuntu2, plus some additional, similarily
  focused ones.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From 28d948ac44e38e8bec2f6268ccf4747ff4d992a9 Mon Sep 17 00:00:00 2001
2
 
From: Laurent Aimar <fenrir@videolan.org>
3
 
Date: Sun, 18 Sep 2011 00:03:08 +0200
4
 
Subject: [PATCH 64/70] rv10: Reject slices that does not have the same type as the first one
5
 
MIME-Version: 1.0
6
 
Content-Type: text/plain; charset=UTF-8
7
 
Content-Transfer-Encoding: 8bit
8
 
 
9
 
This prevents crashes with some corrupted bitstreams.
10
 
 
11
 
Signed-off-by: Martin Storsjö <martin@martin.st>
12
 
(cherry picked from commit 4a29b471869353c3077fb4b25b6518eb1047afb7)
13
 
 
14
 
Signed-off-by: Anton Khirnov <anton@khirnov.net>
15
 
---
16
 
 libavcodec/rv10.c |    5 +++++
17
 
 1 files changed, 5 insertions(+), 0 deletions(-)
18
 
 
19
 
diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c
20
 
index 78f97b1..223500c 100644
21
 
--- a/libavcodec/rv10.c
22
 
+++ b/libavcodec/rv10.c
23
 
@@ -543,6 +543,11 @@ static int rv10_decode_packet(AVCodecContext *avctx,
24
 
         if(MPV_frame_start(s, avctx) < 0)
25
 
             return -1;
26
 
         ff_er_frame_start(s);
27
 
+    } else {
28
 
+        if (s->current_picture_ptr->pict_type != s->pict_type) {
29
 
+            av_log(s->avctx, AV_LOG_ERROR, "Slice type mismatch\n");
30
 
+            return -1;
31
 
+        }
32
 
     }
33
 
 
34
 
     av_dlog(avctx, "qscale=%d\n", s->qscale);
35
 
1.7.4.1
36