dial: reject dial to * (aka 0.0.0.0)
fixes #15 http://code.swtch.com/plan9port/issues/15 http://codereview.appspot.com/107043
This commit is contained in:
parent
94349f64d1
commit
6d558e12b0
1 changed files with 5 additions and 0 deletions
|
|
@ -46,6 +46,11 @@ p9dial(char *addr, char *local, char *dummy2, int *dummy3)
|
|||
free(buf);
|
||||
return -1;
|
||||
}
|
||||
if(host == 0){
|
||||
werrstr("invalid dial address 0.0.0.0 (aka *)");
|
||||
free(buf);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(strcmp(net, "tcp") == 0)
|
||||
proto = SOCK_STREAM;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue