gpg: Fix off-by-one read in the attribute subpacket parser.
authorWerner Koch <wk@gnupg.org>
Mon, 24 Nov 2014 18:12:37 +0000 (19:12 +0100)
committerWerner Koch <wk@gnupg.org>
Mon, 24 Nov 2014 18:27:20 +0000 (19:27 +0100)
commit7a068ac50bc48de26e93cfeadf412b37257f97d5
tree74ebafd044788079225078b4d6ee97b990f857c2
parent92a7949ae6331b5e188480b76ce29a86ede6e89e
gpg: Fix off-by-one read in the attribute subpacket parser.

* g10/parse-packet.c (parse_attribute_subpkts): Check that the
attribute packet is large enough for the subpacket type.
--

Reported-by: Hanno Böck
Signed-off-by: Werner Koch <wk@gnupg.org>
(backported from commit 0988764397f99db4efef1eabcdb8072d6159af76)
g10/parse-packet.c