[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] Better bounds checking on parsed ints



Update of /home/or/cvsroot/src/common
In directory moria.mit.edu:/tmp/cvs-serv6190/src/common

Modified Files:
	util.c 
Log Message:
Better bounds checking on parsed ints

Index: util.c
===================================================================
RCS file: /home/or/cvsroot/src/common/util.c,v
retrieving revision 1.141
retrieving revision 1.142
diff -u -d -r1.141 -r1.142
--- util.c	12 Oct 2004 16:02:15 -0000	1.141
+++ util.c	12 Oct 2004 19:01:53 -0000	1.142
@@ -2052,7 +2052,7 @@
   if (colon) {
     _address = tor_strndup(addrport, colon-addrport);
     _port = atoi(colon+1);
-    if (_port<1 || _port>65536) {
+    if (_port<1 || _port>65535) {
       log_fn(LOG_WARN, "Port '%s' out of range", colon+1);
       _port = 0;
       ok = 0;