From 20065fd19ecec1feadf8ba6c36724da6ac62d21d Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 10 Nov 2019 05:28:06 -0800 Subject: fixes #1011 snprintf argument overflow in ws test code --- tests/ws.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ws.c b/tests/ws.c index 59d4d52d..56564c37 100644 --- a/tests/ws.c +++ b/tests/ws.c @@ -1,5 +1,5 @@ // -// Copyright 2018 Staysail Systems, Inc. +// Copyright 2019 Staysail Systems, Inc. // Copyright 2018 Capitar IT Group BV // // This software is supplied under the terms of the MIT License, a @@ -171,7 +171,7 @@ TestMain("WebSocket Transport", { So(nng_listener_getopt_int( l1, NNG_OPT_TCP_BOUND_PORT, &port) == 0); So(port != 0); - snprintf(ws_url, 1023, "ws://*:%d/two", port); + snprintf(ws_url, sizeof(ws_url), "ws://*:%d/two", port); So(nng_listen(s2, ws_url, NULL, 0) == 0); }); -- cgit v1.2.3-70-g09d2