~ubuntu-branches/ubuntu/lucid/ffmpeg-extra/lucid

« back to all changes in this revision

Viewing changes to debian/patches/security/libavcodec/mpegaudiodec/0003-Set-data_size-to-0-to-avoid-having-it-uninitialized.patch

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2009-11-10 13:18:24 UTC
  • Revision ID: james.westby@ubuntu.com-20091110131824-ddrnmcvt76dcb8gk
Tags: 4:0.5+svn20090706-2ubuntu4
merge from 'ffmpeg' package

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From 7565e59ef9effe28962d7103f78c2d25e76524e0 Mon Sep 17 00:00:00 2001
 
2
From: michael <michael@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
 
3
Date: Wed, 23 Sep 2009 11:44:30 +0000
 
4
Subject: [PATCH 3/3] Set data_size to 0 to avoid having it uninitialized.
 
5
 based on 31_mp3_outlen.patch by chrome.
 
6
 
 
7
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19988 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
 
8
---
 
9
 libavcodec/mpegaudiodec.c |    1 +
 
10
 1 files changed, 1 insertions(+), 0 deletions(-)
 
11
 
 
12
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
 
13
index 3003e18..dd986bd 100644
 
14
--- a/libavcodec/mpegaudiodec.c
 
15
+++ b/libavcodec/mpegaudiodec.c
 
16
@@ -2278,6 +2278,7 @@ static int decode_frame(AVCodecContext * avctx,
 
17
 
 
18
     if(*data_size < 1152*avctx->channels*sizeof(OUT_INT))
 
19
         return -1;
 
20
+    *data_size = 0;
 
21
 
 
22
     if(s->frame_size<=0 || s->frame_size > buf_size){
 
23
         av_log(avctx, AV_LOG_ERROR, "incomplete frame\n");
 
24
-- 
 
25
1.6.3.3
 
26