Fix the size of the hash array when checking sig hashes
authorJonathan McDowell <noodles@earth.li>
Sat, 14 Jul 2012 19:20:27 +0000 (13:20 -0600)
committerJonathan McDowell <noodles@earth.li>
Sat, 14 Jul 2012 19:20:27 +0000 (13:20 -0600)
It was only 20 bytes - big enough for SHA1, but not when the larger
SHA2 hashes are available in nettle. This allows up to SHA512.

sigcheck.c

index e5e8ccde9640e6bce5ce248e0d3d16bf200d9557..852b53b3784a578d5d41c933b1b5b8cc2656f331 100644 (file)
@@ -57,7 +57,7 @@ int check_packet_sighash(struct openpgp_publickey *key,
        uint8_t keyheader[3];
        uint8_t packetheader[5];
        uint8_t v4trailer[6];
-       uint8_t hash[20];
+       uint8_t hash[64];
        uint8_t *hashdata[8];
        size_t hashlen[8];
        int chunks, i;