~ubuntu-branches/ubuntu/precise/mplayer2/precise-proposed

« back to all changes in this revision

Viewing changes to debian/patches/0002-CVE-2011-3625.patch

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2011-10-29 10:38:32 UTC
  • mfrom: (5.1.7 sid)
  • Revision ID: package-import@ubuntu.com-20111029103832-ju6vrxe3ii4m6ucc
Tags: 2.0-134-g84d8671-9
* Bug Fix: "CVE-2011-3625: Buffer overflow in SAMI parsing"
  Thanks to Mehdi Dogguy <mehdi@debian.org> for reporting (Closes: #646937)
* Bumped urgency for fixing security issue.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From 27b88a09c5319deb62221b8cd0ecc14cd1136e4a Mon Sep 17 00:00:00 2001
 
2
From: reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>
 
3
Date: Thu, 19 May 2011 09:11:56 +0000
 
4
Subject: subreader: SAMI subs: wrap line if needed
 
5
 
 
6
Start a new line if there's no space left to append to the previous
 
7
one.
 
8
 
 
9
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33471 b3059339-0415-0410-9bf9-f77b7e298cf2
 
10
---
 
11
diff --git a/sub/subreader.c b/sub/subreader.c
 
12
index 6acecb5..a1d2974 100644
 
13
--- a/sub/subreader.c
 
14
+++ b/sub/subreader.c
 
15
@@ -177,6 +177,8 @@ static subtitle *sub_read_line_sami(stream_t* st, subtitle *current,
 
16
            break;
 
17
 
 
18
        case 3: /* get all text until '<' appears */
 
19
+           if (p - text >= LINE_LEN)
 
20
+               sami_add_line(current, text, &p);
 
21
            if (*s == '\0') break;
 
22
            else if (!strncasecmp (s, "<br>", 4)) {
 
23
                 sami_add_line(current, text, &p);
 
24
--
 
25
cgit v0.9