httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r1089624 - /httpd/httpd/trunk/server/mpm/winnt/service.c
Date Wed, 06 Apr 2011 20:59:47 GMT
Author: trawick
Date: Wed Apr  6 20:59:47 2011
New Revision: 1089624

URL: http://svn.apache.org/viewvc?rev=1089624&view=rev
Log:
can't format time_t with %d; cast this small interval time to int

Modified:
    httpd/httpd/trunk/server/mpm/winnt/service.c

Modified: httpd/httpd/trunk/server/mpm/winnt/service.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/winnt/service.c?rev=1089624&r1=1089623&r2=1089624&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/winnt/service.c (original)
+++ httpd/httpd/trunk/server/mpm/winnt/service.c Wed Apr  6 20:59:47 2011
@@ -149,7 +149,8 @@ void hold_console_open_on_error(void)
                 return;
         }
         remains = ((start + 30) - time(NULL));
-        sprintf (count, "%d...", remains);
+        sprintf(count, "%d...",
+                (int)remains); /* 30 or less, so can't overflow int */
         if (!SetConsoleCursorPosition(hConErr, coninfo.dwCursorPosition))
             return;
         if (!WriteConsole(hConErr, count, (DWORD)strlen(count), &result, NULL)



Mime
View raw message