projects
/
u
/
mdw
/
putty
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
71581f9
)
Buffer overruns are embarassing (even if caused by user error), so assert
author
ben
<ben@cda61777-01e9-0310-a592-d414129be87e>
Wed, 26 Jan 2005 23:49:56 +0000
(23:49 +0000)
committer
ben
<ben@cda61777-01e9-0310-a592-d414129be87e>
Wed, 26 Jan 2005 23:49:56 +0000
(23:49 +0000)
that this one can't happen until I actually fix it.
git-svn-id: svn://svn.tartarus.org/sgt/putty@5217
cda61777
-01e9-0310-a592-
d414129be87e
unix/uxnet.c
patch
|
blob
|
blame
|
history
diff --git
a/unix/uxnet.c
b/unix/uxnet.c
index
d5d04d6
..
71c4515
100644
(file)
--- a/
unix/uxnet.c
+++ b/
unix/uxnet.c
@@
-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) {