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

« back to all changes in this revision

Viewing changes to debian/patches/03-filter-name-needs-to-be-double-0-terminated.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
 
Author: Reinhard Tartler <siretart@ubuntu.com>
2
 
Description: filter name needs to be double 0 terminated
3
 
Forwarded: http://bugzilla.libav.org/show_bug.cgi?id=35
4
 
Bug-Gnome: https://bugzilla.gnome.org/show_bug.cgi?id=654634
5
 
 
6
 
--- a/libpostproc/postprocess.c
7
 
+++ b/libpostproc/postprocess.c
8
 
@@ -763,7 +763,8 @@ pp_mode *pp_get_mode_by_name_and_quality
9
 
     ppMode->maxClippedThreshold= 0.01;
10
 
     ppMode->error=0;
11
 
 
12
 
-    av_strlcpy(temp, name, GET_MODE_BUFFER_SIZE);
13
 
+    memset(temp, 0, GET_MODE_BUFFER_SIZE);
14
 
+    av_strlcpy(temp, name, GET_MODE_BUFFER_SIZE - 1);
15
 
 
16
 
     av_log(NULL, AV_LOG_DEBUG, "pp: %s\n", name);
17
 
 
18
 
@@ -819,7 +820,7 @@ pp_mode *pp_get_mode_by_name_and_quality
19
 
 
20
 
                 plen= strlen(p);
21
 
                 spaceLeft= p - temp + plen;
22
 
-                if(spaceLeft + newlen  >= GET_MODE_BUFFER_SIZE){
23
 
+                if(spaceLeft + newlen  >= GET_MODE_BUFFER_SIZE - 1){
24
 
                     ppMode->error++;
25
 
                     break;
26
 
                 }