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

83675 test echo param could bust bounds

Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
Andy Green 2014-11-30 12:42:14 +08:00
parent 5549998ac3
commit 6a33759bb1

View file

@ -240,7 +240,8 @@ int main(int argc, char **argv)
#ifndef LWS_NO_CLIENT
case 'c':
client = 1;
strcpy(address, optarg);
strncpy(address, optarg, sizeof(address) - 1);
address[sizeof(address) - 1] = '\0';
port = 80;
break;
case 'r':