summaryrefslogtreecommitdiffstats
path: root/doc/install.texi
diff options
context:
space:
mode:
authorJorge Boncompte [DTI2] <jorge@dti2.net>2013-07-31 16:16:05 +0000
committerDavid Lamparter <equinox@opensourcerouting.org>2014-04-01 17:14:44 +0200
commitaf514777f4327932a3e84f83d79e941967503e15 (patch)
tree68ddb2e6dd758b2c50f3a4facea1dfc925460312 /doc/install.texi
parent6d729eeac91578dca29961e0e46f246f33c37f0c (diff)
downloadquagga-af514777f4327932a3e84f83d79e941967503e15.tar.bz2
quagga-af514777f4327932a3e84f83d79e941967503e15.tar.xz
lib: fix possible off-by-one in stream_put_prefix()
The STREAM_WRITEABLE() call only checks if there is space for the prefix in the stream but does not account for the prefixlen. The stream_putc() call reduces available space by 1 and we can end copying one byte too much and with "endp" off by one if we are near the buffer end. Instead of moving the stream_putc() call before STREAM_WRITEABLE(), we check before hand for the required space, and open-code it. This avoids a function call and verifying again the stream buffer. Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'doc/install.texi')
0 files changed, 0 insertions, 0 deletions