Re: [fossil-users] Bug? fossil_strndup is not added terminating null byte ('\0')

2017-06-08 Thread Richard Hipp
On 6/8/17, kowlsd3pw...@yahoo.co.jp wrote: > > > strndup is added terminating null byte. > but Fossil_strndup behaves as strncpy. > fossil_strndup not added terminating null byte ('\0') when len>=0 Good catch. That is only used in one place in the code, but it is

[fossil-users] Bug? fossil_strndup is not added terminating null byte ('\0')

2017-06-08 Thread kowlsd3pw23s
strndup is added terminating null byte. but Fossil_strndup behaves as strncpy. fossil_strndup not added terminating null byte ('\0') when len>=0 src/import.c : fossil_strndup https://www.fossil-scm.org/index.html/artifact?ln=91=14ebf8376b92b944     z[n] = '\0'; test code