mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-06-30 19:12:48 -05:00
Buffer overruns are embarassing (even if caused by user error), so assert
that this one can't happen until I actually fix it. [originally from svn r5217]
This commit is contained in:
@ -728,6 +728,7 @@ Socket sk_newlistener(char *srcaddr, int port, Plug plug, int local_host_only, i
|
||||
hints.ai_addr = NULL;
|
||||
hints.ai_canonname = NULL;
|
||||
hints.ai_next = NULL;
|
||||
assert(port >= 0 && port <= 99999);
|
||||
sprintf(portstr, "%d", port);
|
||||
retcode = getaddrinfo(srcaddr, portstr, &hints, &ai);
|
||||
if (retcode == 0) {
|
||||
|
Reference in New Issue
Block a user