projects
/
tools
/
librpm-tizen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
678dceb
)
Make sure fd bundle is always NULLed on rpmVerifySignatures() exit
author
Panu Matilainen
<pmatilai@redhat.com>
Wed, 25 Mar 2009 15:00:41 +0000
(17:00 +0200)
committer
Panu Matilainen
<pmatilai@redhat.com>
Wed, 25 Mar 2009 15:00:41 +0000
(17:00 +0200)
- readFile() failure could crash on double-free otherwise
lib/rpmchecksig.c
patch
|
blob
|
history
diff --git
a/lib/rpmchecksig.c
b/lib/rpmchecksig.c
index
9680c5d
..
956afdd
100644
(file)
--- a/
lib/rpmchecksig.c
+++ b/
lib/rpmchecksig.c
@@
-697,7
+697,6
@@
int rpmVerifySignatures(QVA_t qva, rpmts ts, FD_t fd,
if (readFile(fd, fn, dig, plbundle, hdrbundle)) {
goto exit;
}
- fdSetBundle(fd, NULL); /* XXX avoid double-free from fd close */
rasprintf(&buf, "%s:%c", fn, (rpmIsVerbose() ? '\n' : ' ') );
@@
-776,6
+775,7
@@
exit:
free(buf);
rpmDigestBundleFree(hdrbundle);
rpmDigestBundleFree(plbundle);
+ fdSetBundle(fd, NULL); /* XXX avoid double-free from fd close */
sigh = rpmFreeSignature(sigh);
hi = headerFreeIterator(hi);
rpmKeyringFree(keyring);