summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2008-04-29 11:54:44 +0300
committerPanu Matilainen <pmatilai@redhat.com>2008-04-29 11:54:44 +0300
commitb2e875be7822947a5a9db063a234e67fd5f2261c (patch)
tree7da0c151bdd1722b7ea3e77383d9033394f599d3 /lib
parent5e775226b6d11fc81022971c06d14ffda3b2e6cb (diff)
downloadrpm-b2e875be7822947a5a9db063a234e67fd5f2261c.tar.gz
rpm-b2e875be7822947a5a9db063a234e67fd5f2261c.tar.bz2
rpm-b2e875be7822947a5a9db063a234e67fd5f2261c.zip
Eliminate remaining alloca() in rpmAddSignature()
Diffstat (limited to 'lib')
-rw-r--r--lib/signature.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/signature.c b/lib/signature.c
index 233ef5195..4b66264a6 100644
--- a/lib/signature.c
+++ b/lib/signature.c
@@ -756,7 +756,7 @@ int rpmAddSignature(Header sigh, const char * file, rpmSigTag sigTag,
break;
case RPMSIGTAG_MD5:
pktlen = 16;
- pkt = memset(alloca(pktlen), 0, pktlen);
+ pkt = xcalloc(pktlen, sizeof(*pkt));
if (rpmDoDigest(PGPHASHALGO_MD5, file, 0, pkt, NULL)
|| !headerAddEntry(sigh, sigTag, RPM_BIN_TYPE, pkt, pktlen))
break;