[SCM] ffmpeg/master: libpostproc: filter name needs to be double 0 terminated

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Thu Aug 25 20:31:01 UTC 2011


The following commit has been merged in the master branch:
commit 11a62342dae35a59ea6a22cf287333eb0a8a7932
Author: Reinhard Tartler <siretart at tauware.de>
Date:   Thu Aug 25 22:30:24 2011 +0200

    libpostproc: filter name needs to be double 0 terminated
    
    avoids nasty segfaults in gstreamer introspection,
    cf. https://bugzilla.gnome.org/show_bug.cgi?id=654634

diff --git a/debian/patches/03-filter-name-needs-to-be-double-0-terminated.patch b/debian/patches/03-filter-name-needs-to-be-double-0-terminated.patch
new file mode 100644
index 0000000..eae2d73
--- /dev/null
+++ b/debian/patches/03-filter-name-needs-to-be-double-0-terminated.patch
@@ -0,0 +1,26 @@
+Author: Reinhard Tartler <siretart at ubuntu.com>
+Description: filter name needs to be double 0 terminated
+Forwarded: http://bugzilla.libav.org/show_bug.cgi?id=35
+Bug-Gnome: https://bugzilla.gnome.org/show_bug.cgi?id=654634
+
+--- a/libpostproc/postprocess.c
++++ b/libpostproc/postprocess.c
+@@ -763,7 +763,8 @@ pp_mode *pp_get_mode_by_name_and_quality
+     ppMode->maxClippedThreshold= 0.01;
+     ppMode->error=0;
+ 
+-    av_strlcpy(temp, name, GET_MODE_BUFFER_SIZE);
++    memset(temp, 0, GET_MODE_BUFFER_SIZE);
++    av_strlcpy(temp, name, GET_MODE_BUFFER_SIZE - 1);
+ 
+     av_log(NULL, AV_LOG_DEBUG, "pp: %s\n", name);
+ 
+@@ -819,7 +820,7 @@ pp_mode *pp_get_mode_by_name_and_quality
+ 
+                 plen= strlen(p);
+                 spaceLeft= p - temp + plen;
+-                if(spaceLeft + newlen  >= GET_MODE_BUFFER_SIZE){
++                if(spaceLeft + newlen  >= GET_MODE_BUFFER_SIZE - 1){
+                     ppMode->error++;
+                     break;
+                 }
diff --git a/debian/patches/series b/debian/patches/series
index 9c3e069..d16e221 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,5 +1,6 @@
 01-Tweak-doxygen-config.patch
 02-make-MAP_ANONYMOUS_AVAILABLE.patch
+03-filter-name-needs-to-be-double-0-terminated.patch
 
 post-0.7.1/0001-riff-Add-mpgv-MPEG-2-fourcc.patch
 post-0.7.1/0002-jpegdec-actually-search-for-and-parse-RSTn.patch

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list