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:
cfe18a3
)
check for bad read in readSignature()
author
root
<devnull@localhost>
Wed, 21 Feb 1996 22:20:37 +0000
(22:20 +0000)
committer
root
<devnull@localhost>
Wed, 21 Feb 1996 22:20:37 +0000
(22:20 +0000)
CVS patchset: 384
CVS date: 1996/02/21 22:20:37
lib/signature.c
patch
|
blob
|
history
diff --git
a/lib/signature.c
b/lib/signature.c
index
be62737
..
2f7ec5e
100644
(file)
--- a/
lib/signature.c
+++ b/
lib/signature.c
@@
-34,7
+34,9
@@
int readSignature(int fd, short sig_type, void **sig)
}
break;
case RPMSIG_PGP262_1024:
- read(fd, pgpbuf, 256);
+ if (read(fd, pgpbuf, 256) != 256) {
+ return 0;
+ }
if (sig) {
*sig = malloc(152);
memcpy(*sig, pgpbuf, 152);