socat/socat-fix-asan-error.patch

14 lines
452 B
Diff
Raw Normal View History

diff --git a/error.c b/error.c
index 3135fd5..eacfec5 100644
--- a/error.c
+++ b/error.c
@@ -360,7 +360,7 @@ void msg2(
if (handler) bufp[-1] = tolower(bufp[-1]); /* for debugging, low chars indicate messages from signal handlers */
#endif
*bufp++ = ' ';
- strncpy(bufp, text, BUFLEN-(bufp-buff)-1);
+ strncpy(bufp, text, BUFLEN-(bufp-buff)-2);
strcat(bufp, "\n");
_msg(level, buff, syslp);
if (level >= diagopts.exitlevel) {