diff options
author | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2011-07-06 12:53:19 +0000 |
---|---|---|
committer | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2011-07-06 12:53:19 +0000 |
commit | e1307c3f7610255db226c7a0c460636090609369 (patch) | |
tree | 74ddc517457ba37fbe6b7995a11c7a1859bdc72a | |
parent | 5dc88722deadeb692a5478a8d69fa91bb2cdb395 (diff) | |
download | perl-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-- | NEWS | 4 | ||||
-rw-r--r-- | URPM.pm | 2 | ||||
-rw-r--r-- | URPM.xs | 4 |
3 files changed, 7 insertions, 3 deletions
@@ -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 @@ -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); @@ -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]); |