Bugfix/win32 build warnings (#936)
* Changed win32 port of localtime to use secure OS API functions when compiled with MSVC * Changed all the sprintf to use snprintf instead in BSC tests to ensure null string endings.
This commit is contained in:
@@ -8143,8 +8143,8 @@ static void test_simple(void)
|
||||
memset(&srv_ctx, 0, sizeof(srv_ctx));
|
||||
srv_ctx.ev = -1;
|
||||
srv_ctx.h = BSC_WEBSOCKET_INVALID_HANDLE;
|
||||
sprintf(
|
||||
url, "wss://%s:%d", BACNET_WEBSOCKET_SERVER_ADDR,
|
||||
snprintf(
|
||||
url, sizeof(url), "wss://%s:%d", BACNET_WEBSOCKET_SERVER_ADDR,
|
||||
BACNET_WEBSOCKET_SERVER_PORT);
|
||||
|
||||
ret = bws_srv_start(
|
||||
@@ -8211,10 +8211,9 @@ static void test_onoff(void)
|
||||
memset(&srv_ctx, 0, sizeof(srv_ctx));
|
||||
srv_ctx.ev = -1;
|
||||
srv_ctx.h = BSC_WEBSOCKET_INVALID_HANDLE;
|
||||
sprintf(
|
||||
url, "wss://%s:%d", BACNET_WEBSOCKET_SERVER_ADDR,
|
||||
snprintf(
|
||||
url, sizeof(url), "wss://%s:%d", BACNET_WEBSOCKET_SERVER_ADDR,
|
||||
BACNET_WEBSOCKET_SERVER_PORT);
|
||||
|
||||
ret = bws_srv_start(
|
||||
BSC_WEBSOCKET_HUB_PROTOCOL, BACNET_WEBSOCKET_SERVER_PORT, NULL, ca_cert,
|
||||
sizeof(ca_cert), server_cert, sizeof(server_cert), server_key,
|
||||
|
||||
Reference in New Issue
Block a user