diff options
| author | Garrett D'Amore <garrett@damore.org> | 2022-12-31 13:55:11 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2022-12-31 13:55:11 -0800 |
| commit | 539e559e65cd8f227c45e4b046ac41c0edcf6c32 (patch) | |
| tree | 36eb234d9511bdcc0edf29a4a1a31b427be929fb /tests/httpserver.c | |
| parent | f26ddeb81a5ea9d316444951f54a2a017db70482 (diff) | |
| download | nng-539e559e65cd8f227c45e4b046ac41c0edcf6c32.tar.gz nng-539e559e65cd8f227c45e4b046ac41c0edcf6c32.tar.bz2 nng-539e559e65cd8f227c45e4b046ac41c0edcf6c32.zip | |
Fixes for some security complaints.
None of these changes are actual security bugs, but GitHub's
scanner reports false positives at Critical severity for them.
(There are a number of complaints from that scanner, many of
which we do not necessarily agree with.)
Diffstat (limited to 'tests/httpserver.c')
| -rw-r--r-- | tests/httpserver.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/httpserver.c b/tests/httpserver.c index f7a28b5d..c593fc81 100644 --- a/tests/httpserver.c +++ b/tests/httpserver.c @@ -1,5 +1,5 @@ // -// Copyright 2021 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2022 Staysail Systems, Inc. <info@staysail.tech> // Copyright 2018 Capitar IT Group BV <info@capitar.com> // Copyright 2020 Dirac Research <robert.bielik@dirac.com> // @@ -191,7 +191,7 @@ TestMain("HTTP Server", { char urlstr[48]; nng_url *url; - trantest_next_address(portbuf, "%u"); + trantest_next_address(portbuf, ""); snprintf( urlstr, sizeof(urlstr), "http://127.0.0.1:%s", portbuf); @@ -295,7 +295,7 @@ TestMain("HTTP Server", { char * subdir1; char * subdir2; - trantest_next_address(urlstr, "http://127.0.0.1:%u"); + trantest_next_address(urlstr, "http://127.0.0.1:"); So(nng_url_parse(&url, urlstr) == 0); So(nng_http_server_hold(&s, url) == 0); So((tmpdir = nni_plat_temp_dir()) != NULL); @@ -497,7 +497,7 @@ TestMain("HTTP Server", { char * subdir1; char * subdir2; - trantest_next_address(urlstr, "http://127.0.0.1:%u"); + trantest_next_address(urlstr, "http://127.0.0.1:"); So(nng_url_parse(&url, urlstr) == 0); So(nng_http_server_hold(&s, url) == 0); So((tmpdir = nni_plat_temp_dir()) != NULL); @@ -698,7 +698,7 @@ TestMain("HTTP Server", { char * file1; char * file2; - trantest_next_address(urlstr, "http://127.0.0.1:%u"); + trantest_next_address(urlstr, "http://127.0.0.1:"); So(nng_url_parse(&url, urlstr) == 0); So(nng_http_server_hold(&s, url) == 0); So((tmpdir = nni_plat_temp_dir()) != NULL); @@ -788,7 +788,7 @@ TestMain("HTTP Server", { char urlstr[32]; nng_url *url; - trantest_next_address(urlstr, "http://127.0.0.1:%u"); + trantest_next_address(urlstr, "http://127.0.0.1:"); So(nng_url_parse(&url, urlstr) == 0); So(nng_http_server_hold(&s, url) == 0); @@ -859,7 +859,7 @@ TestMain("HTTP Server", { char urlstr[32]; nng_url *url; - trantest_next_address(urlstr, "http://127.0.0.1:%u"); + trantest_next_address(urlstr, "http://127.0.0.1:"); So(nng_url_parse(&url, urlstr) == 0); So(nng_http_server_hold(&s, url) == 0); @@ -978,7 +978,7 @@ TestMain("HTTP Server", { char urlstr[32]; nng_url *url; - trantest_next_address(urlstr, "http://127.0.0.1:%u"); + trantest_next_address(urlstr, "http://127.0.0.1:"); So(nng_url_parse(&url, urlstr) == 0); So(nng_http_server_hold(&s, url) == 0); |
