From 29f4ad710baff8e8a4cc43aabc306c5fbc01848c Mon Sep 17 00:00:00 2001 From: David Puglielli Date: Wed, 1 Aug 2018 13:24:20 -0700 Subject: [PATCH] Fix for compilation problem --- source/pdo_sqlsrv/pdo_dbh.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/pdo_sqlsrv/pdo_dbh.cpp b/source/pdo_sqlsrv/pdo_dbh.cpp index be2c00a61..aca3275f3 100644 --- a/source/pdo_sqlsrv/pdo_dbh.cpp +++ b/source/pdo_sqlsrv/pdo_dbh.cpp @@ -463,7 +463,8 @@ struct pdo_dbh_methods pdo_sqlsrv_dbh_methods = { pdo_sqlsrv_dbh* driver_dbh = reinterpret_cast( dbh->driver_data ); \ driver_dbh->set_func( __FUNCTION__ ); \ int length = strlen( __FUNCTION__ ) + strlen( ": entering" ); \ - char func[length+1] = {'\0'}; \ + char func[length+1]; \ + memset(func, '\0', length+1); \ strcpy_s( func, sizeof( __FUNCTION__ ), __FUNCTION__ ); \ strcat_s( func, length+1, ": entering" ); \ LOG( SEV_NOTICE, func ); \