Skip to content
Snippets Groups Projects
Commit 0b85a64b authored by Andy Green's avatar Andy Green
Browse files

coverity 158147 test ping sprintf bounds


Well, just in the test app arg processing, but yes...

Signed-off-by: default avatarAndy Green <andy.green@linaro.org>
parent 0fba8e6e
No related branches found
No related tags found
No related merge requests found
...@@ -450,7 +450,8 @@ int main(int argc, char **argv) ...@@ -450,7 +450,8 @@ int main(int argc, char **argv)
/* create client websockets using dumb increment protocol */ /* create client websockets using dumb increment protocol */
address = argv[optind]; address = argv[optind];
sprintf(ads_port, "%s:%u", address, port & 65535); snprintf(ads_port, sizeof(ads_port), "%s:%u",
address, port & 65535);
lwsl_notice("Connecting to %s...\n", ads_port); lwsl_notice("Connecting to %s...\n", ads_port);
memset(&i, 0, sizeof(i)); memset(&i, 0, sizeof(i));
i.context = context; i.context = context;
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment