]> granicus.if.org Git - php/commitdiff
Fix format for tm member objects as they are stored as integers
authorGeorge Peter Banyard <girgias@php.net>
Mon, 30 Mar 2020 02:11:12 +0000 (04:11 +0200)
committerGeorge Peter Banyard <girgias@php.net>
Mon, 30 Mar 2020 15:09:49 +0000 (17:09 +0200)
Closes GH-5326

ext/standard/ftp_fopen_wrapper.c

index 2c01e88f4f3a69400576a911073c1c6182ca6aaf..7cc19a85b2ad00fc84b634814a5e3c73e526db41 100644 (file)
@@ -844,7 +844,7 @@ static int php_stream_ftp_url_stat(php_stream_wrapper *wrapper, const char *url,
                        goto mdtm_error;
                }
 
-               n = sscanf(p, "%4u%2u%2u%2u%2u%2u", &tm.tm_year, &tm.tm_mon, &tm.tm_mday, &tm.tm_hour, &tm.tm_min, &tm.tm_sec);
+               n = sscanf(p, "%4d%2d%2d%2d%2d%2d", &tm.tm_year, &tm.tm_mon, &tm.tm_mday, &tm.tm_hour, &tm.tm_min, &tm.tm_sec);
                if (n != 6) {
                        goto mdtm_error;
                }