From: Adam Baratz Date: Tue, 31 Oct 2017 20:43:26 +0000 (-0400) Subject: Use size_t instead of int, use more specific format string X-Git-Tag: php-7.3.0alpha1~1123 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2ecfcdaf1b94868756cabbbb2c33276f823dafd7;p=php Use size_t instead of int, use more specific format string --- diff --git a/ext/pdo_dblib/dblib_stmt.c b/ext/pdo_dblib/dblib_stmt.c index 469bd790de..2cebe982e4 100644 --- a/ext/pdo_dblib/dblib_stmt.c +++ b/ext/pdo_dblib/dblib_stmt.c @@ -330,14 +330,14 @@ static int pdo_dblib_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, } case SQLDATETIME: case SQLDATETIM4: { - int dl; + size_t dl; DBDATEREC di; DBDATEREC dt; dbconvert(H->link, coltype, data, -1, SQLDATETIME, (LPBYTE) &dt, -1); dbdatecrack(H->link, &di, (DBDATETIME *) &dt); - dl = spprintf(&tmp_data, 20, "%d-%02d-%02d %02d:%02d:%02d", + dl = spprintf(&tmp_data, 20, "%04d-%02d-%02d %02d:%02d:%02d", #if defined(PHP_DBLIB_IS_MSSQL) || defined(MSDBLIB) di.year, di.month, di.day, di.hour, di.minute, di.second #else