svn commit: r314143 - in head/ports-mgmt/pkg: . files
Bryan Drewery
bdrewery at FreeBSD.org
Thu Mar 14 10:11:35 UTC 2013
Author: bdrewery
Date: Thu Mar 14 10:11:34 2013
New Revision: 314143
URL: http://svnweb.freebsd.org/changeset/ports/314143
Log:
- Fix crash in pkg-update
You may need to manually 'pkg add' 1.0.9_1 or rebuild
from ports if you are on 1.0.9
Submitted by: Alexandre Perrin <alexandre.perrin at netoxygen.ch>
Obtained from: upstream git
With hat: portmgr
Added:
head/ports-mgmt/pkg/files/
head/ports-mgmt/pkg/files/patch-libpkg__pkgdb.c (contents, props changed)
head/ports-mgmt/pkg/files/patch-newvers.sh (contents, props changed)
Modified:
head/ports-mgmt/pkg/Makefile
Modified: head/ports-mgmt/pkg/Makefile
==============================================================================
--- head/ports-mgmt/pkg/Makefile Thu Mar 14 10:11:19 2013 (r314142)
+++ head/ports-mgmt/pkg/Makefile Thu Mar 14 10:11:34 2013 (r314143)
@@ -2,6 +2,7 @@
PORTNAME= pkg
DISTVERSION= 1.0.9
+PORTREVISION= 1
CATEGORIES= ports-mgmt
MASTER_SITES= LOCAL/portmgr \
http://files.etoilebsd.net/pkg/
Added: head/ports-mgmt/pkg/files/patch-libpkg__pkgdb.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/ports-mgmt/pkg/files/patch-libpkg__pkgdb.c Thu Mar 14 10:11:34 2013 (r314143)
@@ -0,0 +1,28 @@
+commit 6bf8c2d025e30e5635e6648f35ff8dcbc7c4709c
+Author: Alexandre Perrin <alexandre.perrin at netoxygen.ch>
+Date: Tue Mar 5 12:04:44 2013 +0100
+
+ check the return value of sqlite3_column_text() against NULL in get_sql_string()
+
+ The return value of sqlite3_column_text() was not checked and passed
+ directly to strdup() causing a SIGSEV from libc. This patch ensure that
+ a NULL returned value will not be given to strdup().
+
+diff --git libpkg/pkgdb.c libpkg/pkgdb.c
+index 7140a69..7a2c706 100644
+--- libpkg/pkgdb.c
++++ libpkg/pkgdb.c
+@@ -2413,8 +2413,11 @@ get_sql_string(sqlite3 *s, const char *sql, char **res)
+
+ ret = sqlite3_step(stmt);
+
+- if (ret == SQLITE_ROW)
+- *res = strdup(sqlite3_column_text(stmt, 0));
++ if (ret == SQLITE_ROW) {
++ const unsigned char *tmp;
++ tmp = sqlite3_column_text(stmt, 0);
++ *res = (tmp == NULL ? NULL : strdup(tmp));
++ }
+
+ if (ret == SQLITE_DONE)
+ *res = NULL;
Added: head/ports-mgmt/pkg/files/patch-newvers.sh
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/ports-mgmt/pkg/files/patch-newvers.sh Thu Mar 14 10:11:34 2013 (r314143)
@@ -0,0 +1,19 @@
+commit de8b5d86da60b0e25fddf5c69a60b6905ab941c4
+Author: Bryan Drewery <bryan at shatow.net>
+Date: Thu Mar 14 05:00:26 2013 -0500
+
+ Bump to 1.0.9_1
+
+diff --git newvers.sh newvers.sh
+index e034c10..0712689 100755
+--- newvers.sh
++++ newvers.sh
+@@ -41,7 +41,7 @@
+ : ${PKG_MINOR_VERSION="0"}
+ : ${PKG_PATCH_LEVEL="9"}
+
+-: ${PORTREVISION:=}
++: ${PORTREVISION:="1"}
+ : ${PORTEPOCH:=}
+
+ # ------------------------------------------------------------------
More information about the svn-ports-head
mailing list