[mediatomb/f12/master] - rhbz651414: patch added to fix buffer overruns on unusually long files

rmattes rmattes at fedoraproject.org
Mon Nov 22 16:46:23 UTC 2010


commit bfd1853c113fd4430b4e7bcc334a59ebfc17642f
Author: Rich <richmattes at gmail.com>
Date:   Mon Nov 22 02:40:48 2010 -0500

    - rhbz651414: patch added to fix buffer overruns on unusually long files

 mediatomb-0.12.1.fixbufferoverrun.patch |   13 +++++++++++++
 mediatomb.spec                          |    7 ++++++-
 2 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/mediatomb-0.12.1.fixbufferoverrun.patch b/mediatomb-0.12.1.fixbufferoverrun.patch
new file mode 100644
index 0000000..12e39e9
--- /dev/null
+++ b/mediatomb-0.12.1.fixbufferoverrun.patch
@@ -0,0 +1,13 @@
+diff -up ./src/tools.cc.fixbufferoverrun ./src/tools.cc
+--- ./src/tools.cc.fixbufferoverrun	2010-11-22 00:57:31.387188000 -0500
++++ ./src/tools.cc	2010-11-22 00:57:44.865188000 -0500
+@@ -665,6 +665,9 @@ String secondsToHMS(int seconds)
+     h = seconds / 60;
+ 
+     // XXX:XX:XX
++		// This fails if h goes over 999
++		if (h > 999)
++			h = 999;
+     char *str = (char *)malloc(10);
+     sprintf(str, "%02d:%02d:%02d", h, m, s);
+     return String::take(str);
diff --git a/mediatomb.spec b/mediatomb.spec
index 89a5abd..cb9baf1 100644
--- a/mediatomb.spec
+++ b/mediatomb.spec
@@ -1,7 +1,7 @@
 Version: 0.12.1
 Summary: UPnP AV MediaServer 
 Name: mediatomb
-Release: 2%{?dist}
+Release: 3%{?dist}
 Summary: MediaTomb - UPnP AV Mediaserver for Linux
 License: GPLv2
 Group: Applications/Multimedia
@@ -9,6 +9,7 @@ Source: http://downloads.sourceforge.net/mediatomb/%{name}-%{version}.tar.gz
 URL: http://mediatomb.cc
 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 
 Patch0: mediatomb-0.12.1.fixogg.patch
+Patch1: mediatomb-0.12.1.fixbufferoverrun
 BuildRequires: sqlite-devel, mysql-devel, libexif-devel, id3lib-devel, file-devel, js-devel, zlib-devel, taglib-devel
 BuildRequires: expat-devel, libcurl-devel
 BuildRequires: libmp4v2-devel
@@ -33,6 +34,7 @@ be found on http://www.upnp.org/.
 %prep 
 %setup -q
 %patch0 -p0
+%patch1 -p1
 
 %build
 %if 0%{?fedora} == 12
@@ -106,6 +108,9 @@ fi
 %{_initrddir}/mediatomb
 
 %changelog
+* Mon Nov 22 2010 Rich Mattes <richmattes at gmail.com> - 0.12.1-3
+- rhbz651414: patch added to fix buffer overruns on unusually long files
+
 * Fri Nov 12 2010 Rich Mattes <richmattes at gmail.com> - 0.12.1-2
 - Add patch to enable ogg metadata by default
 


More information about the scm-commits mailing list