This is the mail archive of the xconq7@sources.redhat.com mailing list for the Xconq project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fixes for string functions


On Sun, 10 Aug 2003, Erik Sigra wrote:

> Here are some fixes for string functions that seem important:

Hi Erik,

  I agree with your fixes in principle.

  However, I am not sure whether vsnprintf(3) enjoys universal support on
the various target platforms. Unlike vsprintf(3), vsnprintf does not
conform to the ANSI C (C89) standard; it was introduced from the BSD
family, and not all SysV platforms may support it (not to mention non-Unix
platforms). I did a grep of the C source in the kernel subdirectory, and
did not turn up any other places where this function is used. But maybe I
am just nitpicking....

  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.

  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.

  Regards,
    Eric


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]