Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > /* > > * We emulate fgets() behaviour. So if there is no newline > > * at the end, we add one... > > */ > > ! if (line[len-1] != '\n') > > strcat(line,"\n"); > > } > > This is untrustworthy if len is zero. Perhaps > > if (len == 0 || line[len-1] != '\n') > strcat(line,"\n");
Agreed, fixed. -- Bruce Momjian | http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073 ---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to increase your free space map settings