common: Don't incorrectly reject 4 GB - 1 sized packets.
authorNeal H. Walfield <neal@g10code.com>
Fri, 21 Aug 2015 09:55:15 +0000 (11:55 +0200)
committerNeal H. Walfield <neal@g10code.com>
Fri, 21 Aug 2015 12:21:13 +0000 (14:21 +0200)
commit09f2a7bca624d0492e1d7ab29ce19542249c13ff
tree16d9f1d0ab6635f21ef8fa13b701e38a48a7cdff
parent4f37820334fadd8c5036ea6c42f3dc242665c4a9
common: Don't incorrectly reject 4 GB - 1 sized packets.

* g10/parse-packet.c (parse): Don't reject 4 GB - 1 sized packets.
Add the constraint that the type must be 63.
* kbx/keybox-openpgp.c (next_packet): Likewise.
* tests/openpgp/4gb-packet.asc: New file.
* tests/openpgp/4gb-packet.test: New file.
* tests/openpgp/Makefile.am (TESTS): Add 4gb-packet.test.
(TEST_FILES): Add 4gb-packet.asc.

--
Signed-off-by: Neal H. Walfield <neal@g10code.com>.
g10/parse-packet.c
kbx/keybox-openpgp.c
tests/openpgp/4gb-packet.asc [new file with mode: 0644]
tests/openpgp/4gb-packet.test [new file with mode: 0755]
tests/openpgp/Makefile.am