]> granicus.if.org Git - php/commitdiff
use slprintf()
authorDmitry Stogov <dmitry@php.net>
Thu, 1 Nov 2007 11:49:27 +0000 (11:49 +0000)
committerDmitry Stogov <dmitry@php.net>
Thu, 1 Nov 2007 11:49:27 +0000 (11:49 +0000)
sapi/cgi/cgi_main.c

index 8602046c05044ab8d156bed1104c071c042fbdbc..1f879756884d84c5d0ede47ce7224836e1221275 100644 (file)
@@ -394,7 +394,7 @@ static int sapi_cgi_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC)
                                (s - SG(sapi_headers).http_status_line) >= 5 &&
                                strncasecmp(SG(sapi_headers).http_status_line, "HTTP/", 5) == 0
                        ) {
-                               len = sprintf(buf, "Status:%s\r\n", s);
+                               len = slprintf(buf, sizeof(buf), "Status:%s\r\n", s);
                        } else {
                                h = (sapi_header_struct*)zend_llist_get_first_ex(&sapi_headers->headers, &pos);
                                while (h) {