Skip to content

Commit

Permalink
Merge pull request #826 from david-puglielli/string-initialisation-nulls
Browse files Browse the repository at this point in the history
Fix for compilation problem
  • Loading branch information
david-puglielli committed Aug 1, 2018
2 parents 026c5d1 + 29f4ad7 commit d699680
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/pdo_sqlsrv/pdo_dbh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,8 @@ struct pdo_dbh_methods pdo_sqlsrv_dbh_methods = {
pdo_sqlsrv_dbh* driver_dbh = reinterpret_cast<pdo_sqlsrv_dbh*>( 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 ); \
Expand Down

0 comments on commit d699680

Please sign in to comment.