Hello,
Il 05/03/2013 12:11, Roberto De Ioris ha scritto:
Il 05/03/2013 11:28, Roberto De Ioris ha scritto:
IP "0.0.0.0" and port "0" looks hardcoded to me:
plugins/corerouter/corerouter.c: memcpy(cs->client_address,
"0.0.0.0",
7);
plugins/corerouter/corerouter.c: memcpy(cs->client_address,
"0.0.0.0",
7);
plugins/corerouter/corerouter.c: memcpy(cs->client_address,
"0.0.0.0",
7);
Or I'm reading memcpy wrong.
no you are right, then it must be something else
some way to reproduce it ?
IIRC coverity reports illegal access to memory a few lines later during
num2str where you copy 11 bytes while the buffer is 7 bytes long. Or
something like that. Please double check.
tcp ports are 16bit so snprintf should not make mess (but the behaviour is
not specified).
I will try using a larger buffer (11) for client_port
CID 989246 (#1 of 1): Out-of-bounds access (OVERRUN)
Overrunning array "cs->client_port" of 6 bytes by passing it to a
function which accesses it at byte offset 10
here:
uwsgi_num2str2(cs->client_sockaddr.sa_in.sin_port, cs->client_port);
which should be this instead?
uwsgi_num2str2n(cs->client_sockaddr.sa_in.sin_port, cs->client_port, 2);
thanks,
riccardo
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi