packages: libvpd/libvpd.spec, libvpd/libvpd-nolink.patch (NEW) - added noli...

qboosh qboosh at pld-linux.org
Tue May 3 10:51:19 CEST 2011


Author: qboosh                       Date: Tue May  3 08:51:19 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- added nolink patch (avoid SEGV when trying to readlink non-existing symlink)

---- Files affected:
packages/libvpd:
   libvpd.spec (1.3 -> 1.4) , libvpd-nolink.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/libvpd/libvpd.spec
diff -u packages/libvpd/libvpd.spec:1.3 packages/libvpd/libvpd.spec:1.4
--- packages/libvpd/libvpd.spec:1.3	Mon May  2 20:54:25 2011
+++ packages/libvpd/libvpd.spec	Tue May  3 10:51:14 2011
@@ -9,6 +9,7 @@
 Source0:	http://downloads.sourceforge.net/linux-diag/%{name}-%{version}.tar.gz
 # Source0-md5:	d4e66ec416eac3a87c790cbdc1c628f4
 Patch0:		%{name}-pc.patch
+Patch1:		%{name}-nolink.patch
 URL:		http://linux-diag.sourceforge.net/Lsvpd.html
 BuildRequires:	libstdc++-devel
 BuildRequires:	sqlite3-devel >= 3
@@ -89,6 +90,7 @@
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 %configure
@@ -150,6 +152,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.4  2011/05/03 08:51:14  qboosh
+- added nolink patch (avoid SEGV when trying to readlink non-existing symlink)
+
 Revision 1.3  2011/05/02 18:54:25  qboosh
 - added Obsoletes for lsvpd-{devel,static}
 

================================================================
Index: packages/libvpd/libvpd-nolink.patch
diff -u /dev/null packages/libvpd/libvpd-nolink.patch:1.1
--- /dev/null	Tue May  3 10:51:19 2011
+++ packages/libvpd/libvpd-nolink.patch	Tue May  3 10:51:14 2011
@@ -0,0 +1,11 @@
+--- libvpd-2.1.2/src/helper_functions.cpp.orig	2010-10-21 01:53:41.000000000 +0200
++++ libvpd-2.1.2/src/helper_functions.cpp	2011-05-03 10:46:27.513059765 +0200
+@@ -157,6 +157,8 @@
+ 		buf = strdup(symLinkPath.c_str());
+ 		int len = readlink(buf, linkTarget, sizeof(
+ 			linkTarget));
++		if(len < 0)
++			return "";
+ 		linkTarget[len] = '\0';
+ 		return string(getAbsolutePath(linkTarget, buf));
+ 	}
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/libvpd/libvpd.spec?r1=1.3&r2=1.4&f=u



More information about the pld-cvs-commit mailing list