diff options
| author | Garrett D'Amore <garrett@damore.org> | 2019-11-10 05:28:06 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2019-11-10 05:28:06 -0800 |
| commit | 20065fd19ecec1feadf8ba6c36724da6ac62d21d (patch) | |
| tree | f9a37b007d1aa00ce458bb9ef25d7fdb9d728672 /tests/ws.c | |
| parent | b58fe9af2ea7043b372b0101b82bf9715afb7e0b (diff) | |
| download | nng-20065fd19ecec1feadf8ba6c36724da6ac62d21d.tar.gz nng-20065fd19ecec1feadf8ba6c36724da6ac62d21d.tar.bz2 nng-20065fd19ecec1feadf8ba6c36724da6ac62d21d.zip | |
fixes #1011 snprintf argument overflow in ws test code
Diffstat (limited to 'tests/ws.c')
| -rw-r--r-- | tests/ws.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ // -// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2019 Staysail Systems, Inc. <info@staysail.tech> // Copyright 2018 Capitar IT Group BV <info@capitar.com> // // 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); }); |
