Re: readstring() bug

2004-07-16 Thread Markus Mauhart
"Paul D. Smith" <[EMAIL PROTECTED]> wrote ... > > %% Markus Mauhart <[EMAIL PROTECTED]> writes: > > mm> ... otherwise the later loop could read outside the allocated memory. > > Yes, but this can never happen because each string _must_ be > nul-terminated, and the previous invocation before the l

Re: readstring() bug

2004-07-15 Thread Paul D. Smith
%% Markus Mauhart <[EMAIL PROTECTED]> writes: mm> 1) first the minor buggy mm> if (ebuf->bufnext > ebuf->bufstart + ebuf->size) mm> return -1; mm> ... if ebuf->size is really malloc'ed size, then this must be ... mm> if (ebuf->bufnext >= ebuf->bufstart + ebuf->size) mm>

Re: readstring() bug

2004-07-15 Thread Markus Mauhart
"Paul D. Smith" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > %% Markus Mauhart <[EMAIL PROTECTED]> writes: > > mm> function readstring() in file read.c has 3 bugs, two of them > mm> concerning backslash newline detection are so killing that IMHO > mm> either complete readstri

Re: readstring() bug

2004-07-15 Thread Paul D. Smith
%% Markus Mauhart <[EMAIL PROTECTED]> writes: mm> function readstring() in file read.c has 3 bugs, two of them mm> concerning backslash newline detection are so killing that IMHO mm> either complete readstring() or at least its backslash newline mm> detection functionality must be dead cod