Skip to content

Commit

Permalink
Fix unsigned underflow for short public key packets in legacy code.
Browse files Browse the repository at this point in the history
  • Loading branch information
lambdafu committed Mar 23, 2018
1 parent cfca3c0 commit 5384abf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions legacy/gnupg/g10/parse-packet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1864,6 +1864,7 @@ static int parse_key(IOBUF inp, int pkttype, unsigned long pktlen, byte *hdr,

pk = pkt->pkt.public_key; /* PK has been cleared. */

if (!pktlen) return GPG_ERR_INV_PACKET;
version = iobuf_get_noeof(inp);
pktlen--;
if (version == 4) {
Expand Down

0 comments on commit 5384abf

Please sign in to comment.