]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Fix an off-by-one bug in recv_pattern().
authorAndre Noll <maan@systemlinux.org>
Sat, 22 Nov 2008 16:38:16 +0000 (17:38 +0100)
committerAndre Noll <maan@systemlinux.org>
Sat, 22 Nov 2008 16:38:16 +0000 (17:38 +0100)
The current code in recv_pattern() allocates a buffer of size
bufsize + 1 and calls recv_buffer() with bufsize as the size
parameter. However, recv_buffer() reserves the last byte of the
buffer for storing the terminating NULL byte, so that at most
bufsize - 1 characters are read.

Fix it by passing bufsize + 1 (the real size of the buffer)
to recv_buffer().


No differences found