[patch] applied: ipinfochk

0 views
Skip to first unread message

9cha...@cat-v.org

unread,
Apr 18, 2008, 1:22:21 AM4/18/08
to plan9c...@googlegroups.com
Created Apr 17 23:22 by none
Processed Apr 18 05:22 by geoff

check results of parseip.

--
/sys/src/libndb/ndbipinfo.c
ndbipinfo.c.orig:188,194 - /n/sources/patch/applied/ipinfochk/ndbipinfo.c:188,197
t = ndbnew("ip", val);
t->line = t;
t->entry = nil;
- parseip(net, val);
+ if(parseip(net, val) == -1){
+ ndbfree(f);
+ return nil;
+ }
} else {
/* found one */
while(nt != nil){
ndbipinfo.c.orig:196,202 - /n/sources/patch/applied/ipinfochk/ndbipinfo.c:199,209
t = ndbconcatenate(t, nt);
nt = ndbsnext(&s, attr, val);
}
- parseip(net, ipstr);
+ if(parseip(net, ipstr) == -1){
+ free(ipstr);
+ ndbfree(f);
+ return nil;
+ }
free(ipstr);
}
ipmove(ip, net);

Reply all
Reply to author
Forward
0 new messages