From owner-svn-ports-all@FreeBSD.ORG Sat Aug 25 22:21:58 2012 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 794F8106564A; Sat, 25 Aug 2012 22:21:58 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 638C98FC0C; Sat, 25 Aug 2012 22:21:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7PMLwSp005657; Sat, 25 Aug 2012 22:21:58 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7PMLwvX005654; Sat, 25 Aug 2012 22:21:58 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201208252221.q7PMLwvX005654@svn.freebsd.org> From: Bryan Drewery Date: Sat, 25 Aug 2012 22:21:58 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r303161 - in head/devel/pkgconf: . files X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Aug 2012 22:21:58 -0000 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, '.');