This is the mail archive of the
xconq7@sources.redhat.com
mailing list for the Xconq project.
Re: Fixes for string functions
> However, I am not sure whether vsnprintf(3) enjoys universal support
I worried about the same thing, so I used strncat and strncpy instead when
I fixed the buffer overflow in make_default_player_spec that was reported
by Steve Kemp.
> Also, in the case where you are dealing with the 300 byte line buffer,
>maybe we should either redefine it as being BUFSIZE (255 bytes) in length,
>or define a LINEBUFSIZE macro, so that we are not hardcoding a literal all
>over the place.
I presume there is a reason why Stan didn't use BUFSIZE here. Extra space
needed for something?
> And even with this fix, we are not entirely out of danger, because the
>buffer that strcat appends the line buffer to may not be large enough.
strncat can handle that. See the make_default_player_spec fix.
Hans