Changeset 2076

Show
Ignore:
Timestamp:
02/12/2008 08:40:23 PM (5 months ago)
Author:
jan
Message:

we need some space for the NUL-char too, fixes infinite loop

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/log.c

    r2073 r2076  
    335335                if (l > -1) { 
    336336                        /* C99: l is the mem-size we need */ 
    337                         buffer_prepare_copy(b, l); 
     337                        buffer_prepare_copy(b, l + 1); /* allocate a bit more than we need */ 
    338338                } else if (tries++ >= 3) { 
    339339                        int e = errno;