httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From soc-r...@apache.org
Subject svn commit: r239469 - /httpd/mod_smtpd/trunk/smtp_protocol.c
Date Tue, 23 Aug 2005 22:34:50 GMT
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;
     }



Mime
View raw message