projects
/
platform
/
upstream
/
libwebsockets.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
27966c2
)
coverity 158146 test fraggle sprintf bounds
author
Andy Green
<andy.green@linaro.org>
Mon, 15 Feb 2016 13:07:09 +0000
(21:07 +0800)
committer
Andy Green
<andy.green@linaro.org>
Mon, 15 Feb 2016 13:07:09 +0000
(21:07 +0800)
Well, just in the test app arg processing, but yes...
Signed-off-by: Andy Green <andy.green@linaro.org>
test-server/test-fraggle.c
patch
|
blob
|
history
diff --git
a/test-server/test-fraggle.c
b/test-server/test-fraggle.c
index
2188799
..
51b5903
100644
(file)
--- a/
test-server/test-fraggle.c
+++ b/
test-server/test-fraggle.c
@@
-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;