svn commit: r303161 - in head/devel/pkgconf: . files
Bryan Drewery
bdrewery at FreeBSD.org
Sat Aug 25 22:21:58 UTC 2012
Author: bdrewery
Date: Sat Aug 25 22:21:57 2012
New Revision: 303161
URL: http://svn.freebsd.org/changeset/ports/303161
Log:
- Fix crash when running pkgconf with no path separators in the
specified filename
Approved by: bapt (maintainer, mentor)
Obtained from: pkgconf git
Added:
head/devel/pkgconf/files/patch-fix-crash-with-no-path-separators (contents, props changed)
Modified:
head/devel/pkgconf/Makefile
Modified: head/devel/pkgconf/Makefile
==============================================================================
--- head/devel/pkgconf/Makefile Sat Aug 25 22:17:28 2012 (r303160)
+++ head/devel/pkgconf/Makefile Sat Aug 25 22:21:57 2012 (r303161)
@@ -7,7 +7,7 @@
PORTNAME= pkgconf
PORTVERSION= 0.8.7
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= devel
MASTER_SITES= http://tortois.es/~nenolod/distfiles/ \
http://files.etoilebsd.net/pkgconf/
Added: head/devel/pkgconf/files/patch-fix-crash-with-no-path-separators
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/pkgconf/files/patch-fix-crash-with-no-path-separators Sat Aug 25 22:21:57 2012 (r303161)
@@ -0,0 +1,26 @@
+--- pkg.c
++++ pkg.c
+@@ -131,8 +131,8 @@
+ char *pathbuf;
+
+ strlcpy(buf, pkg->filename, sizeof buf);
+- pathbuf = strrchr(buf, PKG_DIR_SEP_S);
+- pathbuf[0] = '\0';
++ if ((pathbuf = strrchr(buf, PKG_DIR_SEP_S)) != NULL)
++ pathbuf[0] = '\0';
+
+ return buf;
+ }
+@@ -154,8 +154,10 @@
+ pkg->vars = pkg_tuple_add(pkg->vars, "pcfiledir", pkg_get_parent_dir(pkg));
+
+ /* make module id */
+- idptr = strrchr(pkg->filename, PKG_DIR_SEP_S);
+- idptr++;
++ if ((idptr = strrchr(pkg->filename, PKG_DIR_SEP_S)) != NULL)
++ idptr++;
++ else
++ idptr = pkg->filename;
+
+ pkg->id = strdup(idptr);
+ idptr = strrchr(pkg->id, '.');
More information about the svn-ports-all
mailing list