Make the sanity-checks on the size of incoming packets much stricter. We now
authorben <ben@cda61777-01e9-0310-a592-d414129be87e>
Mon, 20 Jun 2005 13:56:30 +0000 (13:56 +0000)
committerben <ben@cda61777-01e9-0310-a592-d414129be87e>
Mon, 20 Jun 2005 13:56:30 +0000 (13:56 +0000)
commitcba1e4b5171a9ee902db283e21272984a6ddf79a
tree487819dc8eeee4bb0b0700f1515321f6e043f8bd
parent3a12fec2c799c0645be09a1513eaf2a160264d5f
Make the sanity-checks on the size of incoming packets much stricter.  We now
enforce the following:

* Packet must have at least one byte of payload and four bytes of padding.
* Total packet length must not exceed 35000 bytes compressed.
* Total packet length including length field must be a multiple of cipher
  block size (or eight bytes).

The feebleness of our old checks was noticed by Ben Rudiak-Gould.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5981 cda61777-01e9-0310-a592-d414129be87e
ssh.c