Skip to content

Commit

Permalink
Merge pull request #827 from david-puglielli/string-initialisation-nulls
Browse files Browse the repository at this point in the history
Fix for compilation problem again
  • Loading branch information
david-puglielli committed Aug 1, 2018
2 parents d699680 + 0b15997 commit ba9579b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/pdo_sqlsrv/pdo_stmt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,8 @@ void stmt_option_fetch_numeric:: operator()( _Inout_ sqlsrv_stmt* stmt, stmt_opt
pdo_sqlsrv_stmt* driver_stmt = reinterpret_cast<pdo_sqlsrv_stmt*>( stmt->driver_data ); \
driver_stmt->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 ba9579b

Please sign in to comment.