Skip to content

Commit

Permalink
location: Increase buffer size for printing channel info
Browse files Browse the repository at this point in the history
The current buffer size of 32 bytes was too small to hold the version
info string which resulted in a non-null terminated buffer (_snprintf
does not null-terminate the buffer if it is too small) being printed.
  • Loading branch information
mfleisz authored and akallabeth committed Apr 11, 2024
1 parent 2b71465 commit 14cdd6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions channels/location/client/location_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ static UINT location_on_data_received(IWTSVirtualChannelCallback* pChannelCallba
break;
}

char cbuffer[32] = { 0 };
char sbuffer[32] = { 0 };
char cbuffer[64] = { 0 };
char sbuffer[64] = { 0 };
WLog_Print(plugin->baseDynPlugin.log, WLOG_DEBUG,
"Server version %s, client version %s",
location_version_str(callback->serverVersion, sbuffer, sizeof(sbuffer)),
Expand Down

0 comments on commit 14cdd6a

Please sign in to comment.