1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

coverity 158146 test fraggle sprintf bounds

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

Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
Andy Green 2016-02-15 21:07:09 +08:00
parent 27966c29e1
commit 0fba8e6ef8

View file

@ -346,7 +346,8 @@ int main(int argc, char **argv)
struct lws_client_connect_info i;
address = argv[optind];
sprintf(ads_port, "%s:%u", address, port & 65535);
snprintf(ads_port, sizeof(ads_port), "%s:%u",
address, port & 65535);
memset(&i, 0, sizeof(i));
i.context = context;
i.address = address;