Eliminate remaining alloca() in rpmAddSignature()
This commit is contained in:
parent
5e775226b6
commit
b2e875be78
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue