Eliminate remaining alloca() in rpmAddSignature()

This commit is contained in:
Panu Matilainen 2008-04-29 11:54:44 +03:00
parent 5e775226b6
commit b2e875be78
1 changed files with 1 additions and 1 deletions

View File

@ -756,7 +756,7 @@ int rpmAddSignature(Header sigh, const char * file, rpmSigTag sigTag,
break; break;
case RPMSIGTAG_MD5: case RPMSIGTAG_MD5:
pktlen = 16; pktlen = 16;
pkt = memset(alloca(pktlen), 0, pktlen); pkt = xcalloc(pktlen, sizeof(*pkt));
if (rpmDoDigest(PGPHASHALGO_MD5, file, 0, pkt, NULL) if (rpmDoDigest(PGPHASHALGO_MD5, file, 0, pkt, NULL)
|| !headerAddEntry(sigh, sigTag, RPM_BIN_TYPE, pkt, pktlen)) || !headerAddEntry(sigh, sigTag, RPM_BIN_TYPE, pkt, pktlen))
break; break;