summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Beierlein <tomjbe@gentoo.org>2010-10-24 10:03:18 +0000
committerThomas Beierlein <tomjbe@gentoo.org>2010-10-24 10:03:18 +0000
commit08c7e2482cfa5cb3f9492272053d3a2904d45eea (patch)
tree00efe27e71dfd79d59e2ecf6e293f2f85118ac97 /media-radio/xlog
parentRemove media-libs/alsa-oss from deps wrt #342441 by Sven Müller. (diff)
downloadgentoo-2-08c7e2482cfa5cb3f9492272053d3a2904d45eea.tar.gz
gentoo-2-08c7e2482cfa5cb3f9492272053d3a2904d45eea.tar.bz2
gentoo-2-08c7e2482cfa5cb3f9492272053d3a2904d45eea.zip
Fix buffer overflow for big cty.dat files
(Portage version: 2.1.9.22/cvs/Linux x86_64)
Diffstat (limited to 'media-radio/xlog')
-rw-r--r--media-radio/xlog/ChangeLog6
-rw-r--r--media-radio/xlog/files/xlog-2.0.3-dxcc.patch30
-rw-r--r--media-radio/xlog/xlog-2.0.3.ebuild4
3 files changed, 38 insertions, 2 deletions
diff --git a/media-radio/xlog/ChangeLog b/media-radio/xlog/ChangeLog
index 0c6dddcfbcdf..dfd8466428a5 100644
--- a/media-radio/xlog/ChangeLog
+++ b/media-radio/xlog/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for media-radio/xlog
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-radio/xlog/ChangeLog,v 1.14 2010/10/04 15:19:36 tomjbe Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-radio/xlog/ChangeLog,v 1.15 2010/10/24 10:03:18 tomjbe Exp $
+
+ 24 Oct 2010; Thomas Beierlein <tomjbe@gentoo.org> xlog-2.0.3.ebuild,
+ +files/xlog-2.0.3-dxcc.patch:
+ Fix buffer overflow for big cty.dat files
04 Oct 2010; Thomas Beierlein <tomjbe@gentoo.org> xlog-2.0.3.ebuild,
+files/xlog-2.0.3-memmove.patch:
diff --git a/media-radio/xlog/files/xlog-2.0.3-dxcc.patch b/media-radio/xlog/files/xlog-2.0.3-dxcc.patch
new file mode 100644
index 000000000000..dff52d42108c
--- /dev/null
+++ b/media-radio/xlog/files/xlog-2.0.3-dxcc.patch
@@ -0,0 +1,30 @@
+# prevent buffer overflow for big cty.dat files
+--- src/dxcc.c.orig 2010-10-24 11:47:15.000000000 +0200
++++ src/dxcc.c 2010-10-24 11:47:59.000000000 +0200
+@@ -364,7 +364,7 @@
+ gint
+ readctyversion (void)
+ {
+- gchar buf[65536], *ver, *ch, *cty_location;
++ gchar buf[131072], *ver, *ch, *cty_location;
+ FILE *fp;
+
+ #ifdef G_OS_WIN32
+@@ -378,7 +378,7 @@
+ return (1);
+ }
+ g_free (cty_location);
+- gint n = fread (buf, 1, 65536, fp);
++ gint n = fread (buf, 1, 131072, fp);
+ buf[n] = '\0';
+ ver = strstr (buf, "VER2");
+ if (ver)
+@@ -400,7 +400,7 @@
+ readctydata (void)
+ {
+
+- gchar buf[8192], *cty_location, *pfx, **split, **pfxsplit;
++ gchar buf[65536], *cty_location, *pfx, **split, **pfxsplit;
+ gint ichar = 0, dxccitem = 0, ipfx = 0, ch = 0;
+ gboolean firstcolon = FALSE;
+ FILE *fp;
diff --git a/media-radio/xlog/xlog-2.0.3.ebuild b/media-radio/xlog/xlog-2.0.3.ebuild
index 4eabf9e6944e..3e2e1d8e7cb5 100644
--- a/media-radio/xlog/xlog-2.0.3.ebuild
+++ b/media-radio/xlog/xlog-2.0.3.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-radio/xlog/xlog-2.0.3.ebuild,v 1.4 2010/10/04 15:19:36 tomjbe Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-radio/xlog/xlog-2.0.3.ebuild,v 1.5 2010/10/24 10:03:18 tomjbe Exp $
EAPI=2
@@ -28,6 +28,8 @@ src_prepare() {
# and patch wrong ADIF export
epatch "${FILESDIR}/${PN}-2.0.1-adif.patch" \
"${FILESDIR}/${PN}-2.0.2-qsl.patch"
+ # patch buffer overflow for new cty.dat
+ epatch "${FILESDIR}"/${P}-dxcc.patch
# fix buffer overflow (bug 339652)
epatch "${FILESDIR}/${P}-memmove.patch"
eautoreconf