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

« back to all changes in this revision

Viewing changes to debian/patches/post-0.7.1/0059-Check-for-invalid-VLC-value-in-smacker-decoder.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 0d93b03e6861fafd3eddd9ee164cf56630c9d899 Mon Sep 17 00:00:00 2001
 
2
From: Laurent Aimar <fenrir@videolan.org>
 
3
Date: Mon, 12 Sep 2011 23:49:36 +0200
 
4
Subject: [PATCH 59/70] Check for invalid VLC value in smacker decoder.
 
5
MIME-Version: 1.0
 
6
Content-Type: text/plain; charset=UTF-8
 
7
Content-Transfer-Encoding: 8bit
 
8
 
 
9
Signed-off-by: Martin Storsjö <martin@martin.st>
 
10
(cherry picked from commit 6489455495fc5bfbebcfe3f57e5d4fdd6a781091)
 
11
 
 
12
Signed-off-by: Anton Khirnov <anton@khirnov.net>
 
13
---
 
14
 libavcodec/smacker.c |    2 ++
 
15
 1 files changed, 2 insertions(+), 0 deletions(-)
 
16
 
 
17
diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
 
18
index e8de0d8..9628b07 100644
 
19
--- a/libavcodec/smacker.c
 
20
+++ b/libavcodec/smacker.c
 
21
@@ -139,6 +139,8 @@ static int smacker_decode_bigtree(GetBitContext *gb, HuffContext *hc, DBCtx *ctx
 
22
         b2 = get_bits_count(gb);
 
23
         i2 = ctx->v2->table ? get_vlc2(gb, ctx->v2->table, SMKTREE_BITS, 3) : 0;
 
24
         b2 = get_bits_count(gb) - b2;
 
25
+        if (i1 < 0 || i2 < 0)
 
26
+            return -1;
 
27
         val = ctx->recode1[i1] | (ctx->recode2[i2] << 8);
 
28
         if(val == ctx->escapes[0]) {
 
29
             ctx->last[0] = hc->current;
 
30
-- 
 
31
1.7.4.1
 
32