projects
/
platform
/
upstream
/
rpm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
64cbf9d
)
Only honor keylen if keyp is also specified
author
Panu Matilainen
<pmatilai@redhat.com>
Thu, 9 Jun 2011 08:26:32 +0000
(11:26 +0300)
committer
Panu Matilainen
<pmatilai@redhat.com>
Thu, 9 Jun 2011 08:26:32 +0000
(11:26 +0300)
lib/rpmdb.c
patch
|
blob
|
history
diff --git
a/lib/rpmdb.c
b/lib/rpmdb.c
index
b041768
..
eb72607
100644
(file)
--- a/
lib/rpmdb.c
+++ b/
lib/rpmdb.c
@@
-455,8
+455,10
@@
static int dbiCursorGetToSet(dbiCursor dbc, const char *keyp, size_t keylen,
memset(&data, 0, sizeof(data));
memset(&key, 0, sizeof(key));
- key.data = (void *) keyp; /* discards const */
- key.size = keylen;
+ if (keyp) {
+ key.data = (void *) keyp; /* discards const */
+ key.size = keylen;
+ }
rc = dbiCursorGet(dbc, &key, &data, DB_SET);