aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPer Øyvind Karlsen <peroyvind@mandriva.org>2011-07-06 12:53:19 +0000
committerPer Øyvind Karlsen <peroyvind@mandriva.org>2011-07-06 12:53:19 +0000
commite1307c3f7610255db226c7a0c460636090609369 (patch)
tree74ddc517457ba37fbe6b7995a11c7a1859bdc72a
parent5dc88722deadeb692a5478a8d69fa91bb2cdb395 (diff)
downloadperl-URPM-e1307c3f7610255db226c7a0c460636090609369.tar
perl-URPM-e1307c3f7610255db226c7a0c460636090609369.tar.gz
perl-URPM-e1307c3f7610255db226c7a0c460636090609369.tar.bz2
perl-URPM-e1307c3f7610255db226c7a0c460636090609369.tar.xz
perl-URPM-e1307c3f7610255db226c7a0c460636090609369.zip
fix a segfault happening when URPM::DB::convert() is run without arguments
-rw-r--r--NEWS4
-rw-r--r--URPM.pm2
-rw-r--r--URPM.xs4
3 files changed, 7 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index c59490c..5becb27 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+Version 4.36 - 6 July 2011, by Per Øyvind Karlsen
+
+- fix a segfault happening when URPM::DB::convert() is run without arguments
+
Version 4.35 - 5 July 2011, by Per Øyvind Karlsen
- fix a regression breaking promotion of dependencies on conflicts
diff --git a/URPM.pm b/URPM.pm
index 6b5e82d..4d542ea 100644
--- a/URPM.pm
+++ b/URPM.pm
@@ -11,7 +11,7 @@ use URPM::Resolve;
use URPM::Signature;
our @ISA = qw(DynaLoader);
-our $VERSION = '4.35';
+our $VERSION = '4.36';
URPM->bootstrap($VERSION);
diff --git a/URPM.xs b/URPM.xs
index 1fe6a6b..1bab88c 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -1662,7 +1662,7 @@ rpmdb_convert(const char *prefix, int dbtype, int swap, int rebuild) {
addMacro(NULL, "__dbi_txn", NULL, "create mpool txn thread thread_count=64 nofsync", -1);
/* (ugly) clear any existing locks */
- fn = rpmGetPath(prefix[0] ? prefix : "", dbpath, "/", "__db.*", NULL);
+ fn = rpmGetPath(prefix && prefix[0] ? prefix : "", dbpath, "/", "__db.*", NULL);
xx = Glob(fn, 0, NULL, &gl);
for (i = 0; i < (int)gl.gl_pathc; i++)
xx = Unlink(gl.gl_pathv[i]);
@@ -1940,7 +1940,7 @@ rpmdb_convert(const char *prefix, int dbtype, int swap, int rebuild) {
fn = _free(fn);
/* clear locks */
- fn = rpmGetPath(prefix[0] ? prefix : "", dbpath, "/", "__db.*", NULL);
+ fn = rpmGetPath(prefix && prefix[0] ? prefix : "", dbpath, "/", "__db.*", NULL);
xx = Glob(fn, 0, NULL, &gl);
for (i = 0; i < (int)gl.gl_pathc; i++)
xx = Unlink(gl.gl_pathv[i]);