shithub: drawterm

Download patch

ref: 17efd16d0f0c57bab790b423c4ca0e01d525f755
parent: 50200c18937a227ab969b5b1aaa177220612e0e9
author: Russ Cox <[email protected]>
date: Thu Apr 6 11:54:12 EDT 2006

misparsing 9grid.net

--- a/kern/devip.c
+++ b/kern/devip.c
@@ -688,9 +688,11 @@
 	p = from;
 	memset(to, 0, 4);
 	for(i = 0; i < 4 && *p; i++){
-		to[i] = strtoul(p, &p, 0);
+		to[i] = strtoul(p, &p, 10);
 		if(*p == '.')
 			p++;
+		if(*p != '.' && *p != 0)
+			return 0;
 	}
 	switch(CLASS(to)){
 	case 0:	/* class A - 1 byte net */