LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File 001-fix-strncat.patch of Package proxsmtp (Project home:bastianfriedrich)

--- proxsmtp-1.10.ori/common/smtppass.c	2011-09-16 17:51:27.000000000 +0200
+++ proxsmtp-1.10/common/smtppass.c	2013-03-23 16:58:38.711370108 +0100
@@ -2035,7 +2035,7 @@
         strerror_r(e, buf + len, MAX_MSGLEN - len); */
 
         sp_lock();
-            strncat(buf, strerror(e), MAX_MSGLEN);
+            strncat(buf, strerror(e), MAX_MSGLEN - (strlen(buf) + 1));
         sp_unlock();
     }