gpg: More carefully encode a packet's length.
authorNeal H. Walfield <neal@g10code.com>
Thu, 25 Feb 2016 20:20:32 +0000 (21:20 +0100)
committerNeal H. Walfield <neal@g10code.com>
Thu, 25 Feb 2016 20:20:32 +0000 (21:20 +0100)
commit960f5e26f2cda3ac6e6b30548fa808a690c39ffc
tree60384cc1334e34dd53683dde662f39ca995a3c8b
parent105a5629c7e938ec7b3c9c338ebe7bdfee4cfdad
gpg: More carefully encode a packet's length.

* g10/build-packet.c (write_header2): Make sure the length bits are
cleared.  Fail if HDRLEN is set and the specified length can't be
encoded in the available space.

--
Signed-off-by: Neal H. Walfield <neal@g10code.com>
g10/build-packet.c