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

« back to all changes in this revision

Viewing changes to debian/patches/post-0.7.1/0005-postprocess.c-filter-name-needs-to-be-double-0-termi.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 20ca827019a72bfacb38e73d0b8590e651818272 Mon Sep 17 00:00:00 2001
2
 
From: Piotr Kaczuba <p.kaczuba@attika.ath.cx>
3
 
Date: Mon, 30 May 2011 13:19:35 +0200
4
 
Subject: [PATCH 5/6] postprocess.c: filter name needs to be double 0 terminated
5
 
 
6
 
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
7
 
(cherry picked from commit f4f3300c09bb13eb7922e60888b55e3e0fb325e7)
8
 
---
9
 
 libpostproc/postprocess.c |    5 +++--
10
 
 1 files changed, 3 insertions(+), 2 deletions(-)
11
 
 
12
 
diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c
13
 
index dd50daf..eacf262 100644
14
 
--- a/libpostproc/postprocess.c
15
 
+++ b/libpostproc/postprocess.c
16
 
@@ -763,7 +763,8 @@ pp_mode *pp_get_mode_by_name_and_quality(const char *name, int quality)
17
 
     ppMode->maxClippedThreshold= 0.01;
18
 
     ppMode->error=0;
19
 
 
20
 
-    av_strlcpy(temp, name, GET_MODE_BUFFER_SIZE);
21
 
+    memset(temp, 0, GET_MODE_BUFFER_SIZE);
22
 
+    av_strlcpy(temp, name, GET_MODE_BUFFER_SIZE - 1);
23
 
 
24
 
     av_log(NULL, AV_LOG_DEBUG, "pp: %s\n", name);
25
 
 
26
 
@@ -819,7 +820,7 @@ pp_mode *pp_get_mode_by_name_and_quality(const char *name, int quality)
27
 
 
28
 
                 plen= strlen(p);
29
 
                 spaceLeft= p - temp + plen;
30
 
-                if(spaceLeft + newlen  >= GET_MODE_BUFFER_SIZE){
31
 
+                if(spaceLeft + newlen  >= GET_MODE_BUFFER_SIZE - 1){
32
 
                     ppMode->error++;
33
 
                     break;
34
 
                 }
35
 
1.7.4.1
36