e48f3cfbfc
and forgot what I was trying to do originally and accidently zapped a feature. :-] The problem is that we are converting a counted buffer in a malloc pool into a null terminated C-style string. I was calling realloc originally to shrink the buffer to the desired size. If realloc failed, we still returned the valid buffer - the only thing wrong was it was a tad too large. The previous commit disabled this. This commit now handles the three cases.. 1: the buffer is exactly right for the null byte to terminate the string (we don't call realloc). 2: it's got h.left = 0, so we must expand it to make room. If realloc fails here, it's fatal. 3: if there's too much room, we realloc to shrink it - a failed realloc is not fatal, we use the original buffer which is still valid. |
||
---|---|---|
.. | ||
compat | ||
csu/i386 | ||
libalias | ||
libc | ||
libc_r | ||
libcom_err | ||
libcompat | ||
libcrypt | ||
libcurses | ||
libdisk | ||
libedit | ||
libf2c | ||
libF77 | ||
libftpio | ||
libgnumalloc | ||
libI77 | ||
libipx | ||
libkse | ||
libkvm | ||
libm | ||
libmd | ||
libmytinfo | ||
libncurses | ||
libopie | ||
libpam/modules | ||
libpcap | ||
libpthread | ||
libresolv | ||
librpc | ||
librpcsvc | ||
libscsi | ||
libskey | ||
libss | ||
libtcl | ||
libtelnet | ||
libterm | ||
libtermcap | ||
libutil | ||
libxpg4 | ||
liby | ||
libz | ||
msun | ||
ncurses/ncurses | ||
Makefile | ||
Makefile.inc |