inn/lib/error.c
Igor Timkin
ivt at newsfeed.gamma.ru
Mon Nov 27 18:49:56 UTC 2000
Avoid of the lost of last character in error message.
I got:
Nov 27 21:00:46 newsfeed innfeed[32381]: failed to malloc 574238047 bytes at cnf
s.c line 134: Cannot allocate memory
but really line number is 1346.
--- inn/lib/error.c Tue Nov 14 03:15:18 2000
+++ inn/lib/error.c.NEW Mon Nov 27 21:46:00 2000
@@ -122,7 +122,7 @@
len + 1, __FILE__, __LINE__, strerror(errno));
exit(1);
}
- vsnprintf(buffer, len, fmt, args);
+ vsnprintf(buffer, len + 1, fmt, args);
syslog(pri, err ? "%s: %m" : "%s", buffer);
free(buffer);
}
More information about the inn-patches
mailing list