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

« back to all changes in this revision

Viewing changes to debian/patches/post-0.7.1/0055-ape-demuxer-fix-segfault-on-memory-allocation-failur.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 4ee014309c377f7cfaa9578a393864ae500136f6 Mon Sep 17 00:00:00 2001
 
2
From: Laurent Aimar <fenrir@videolan.org>
 
3
Date: Sun, 11 Sep 2011 19:17:40 +0200
 
4
Subject: [PATCH 55/70] ape demuxer: fix segfault on memory allocation failure.
 
5
 
 
6
Signed-off-by: Anton Khirnov <anton@khirnov.net>
 
7
(cherry picked from commit 273aab99bf7be2bcda95dd64101c2317ee0fcb99)
 
8
 
 
9
Signed-off-by: Anton Khirnov <anton@khirnov.net>
 
10
---
 
11
 libavformat/ape.c |    2 ++
 
12
 1 files changed, 2 insertions(+), 0 deletions(-)
 
13
 
 
14
diff --git a/libavformat/ape.c b/libavformat/ape.c
 
15
index 90b0261..b084100 100644
 
16
--- a/libavformat/ape.c
 
17
+++ b/libavformat/ape.c
 
18
@@ -270,6 +270,8 @@ static int ape_read_header(AVFormatContext * s, AVFormatParameters * ap)
 
19
 
 
20
     if (ape->seektablelength > 0) {
 
21
         ape->seektable = av_malloc(ape->seektablelength);
 
22
+        if (!ape->seektable)
 
23
+            return AVERROR(ENOMEM);
 
24
         for (i = 0; i < ape->seektablelength / sizeof(uint32_t); i++)
 
25
             ape->seektable[i] = avio_rl32(pb);
 
26
     }
 
27
-- 
 
28
1.7.4.1
 
29