]> granicus.if.org Git - apache/commitdiff
can't format time_t with %d; cast this small interval time to int
authorJeff Trawick <trawick@apache.org>
Wed, 6 Apr 2011 20:59:47 +0000 (20:59 +0000)
committerJeff Trawick <trawick@apache.org>
Wed, 6 Apr 2011 20:59:47 +0000 (20:59 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1089624 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/winnt/service.c

index fb5704aa4e7fd2bdb424856ee6fdb4f92cf2c6f9..e8311bf22b5e4283b7a8006c13d5e36d87c9e84f 100644 (file)
@@ -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)