You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by so...@apache.org on 2005/08/24 00:34:50 UTC

svn commit: r239469 - /httpd/mod_smtpd/trunk/smtp_protocol.c

Author: soc-rian
Date: Tue Aug 23 15:34:41 2005
New Revision: 239469

URL: http://svn.apache.org/viewcvs?rev=239469&view=rev
Log:
use snprintf instead of sprintf to prevent buffer overruns

Modified:
    httpd/mod_smtpd/trunk/smtp_protocol.c

Modified: httpd/mod_smtpd/trunk/smtp_protocol.c
URL: http://svn.apache.org/viewcvs/httpd/mod_smtpd/trunk/smtp_protocol.c?rev=239469&r1=239468&r2=239469&view=diff
==============================================================================
--- httpd/mod_smtpd/trunk/smtp_protocol.c (original)
+++ httpd/mod_smtpd/trunk/smtp_protocol.c Tue Aug 23 15:34:41 2005
@@ -84,7 +84,8 @@
     case SMTPD_DONE_DISCONNECT:
         goto end;
     default:
-        sprintf(buffer, "%s %s", scr->s->server_hostname, pConfig->sId);
+        snprintf(buffer, BUFFER_STR_LEN, "%s %s", scr->s->server_hostname,
+                 pConfig->sId);
         smtpd_respond_oneline(scr, 220, buffer);
         break;
     }