]> git.sur5r.net Git - openldap/commit
ITS#2465 fix? ber_get_next must read at least sizeof(tag)+sizeof(len)
authorHoward Chu <hyc@openldap.org>
Thu, 24 Apr 2003 02:10:18 +0000 (02:10 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 24 Apr 2003 02:10:18 +0000 (02:10 +0000)
commitbcf7ab26e47e2b297cb3f0ded93b677a29bfb4e3
tree8ab4e483616b8389e86f9bb7d9c3ea7fac237b98
parentd14ff18d7f2132317df4de6ae45fabb8d2276134
ITS#2465 fix?  ber_get_next must read at least sizeof(tag)+sizeof(len)
which should be at most 8 bytes. However if we read more than the minimum
message length, we have a problem because we steal bytes from any following
message, and there is no buffer mechanism to push back excess data.
The shortest legitimate message is Unbind at 7 bytes, but there shouldn't
be anything following it. Abandon at 8 bytes is next, so always requesting
at least 8 bytes should be safe. Always requesting 9 was a problem.

Please double-check these assumptions...
libraries/liblber/io.c