common: Better respect the packet's length when reading it.
authorNeal H. Walfield <neal@g10code.com>
Fri, 21 Aug 2015 07:28:49 +0000 (09:28 +0200)
committerNeal H. Walfield <neal@g10code.com>
Fri, 21 Aug 2015 12:20:43 +0000 (14:20 +0200)
commit73af66a0aada8f30d8f400fdc4f69e233fb53089
tree20b924675d301e423f625426e7420031ad80567a
parentb8adfc4186fa209dce3e7ca763cec8576b8ee291
common: Better respect the packet's length when reading it.

* g10/parse-packet.c (parse_signature): Make sure PKTLEN doesn't
underflow.  Be more careful that a read doesn't read more data than
PKTLEN says is available.

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