diff options
author | Russ Cox <rsc@swtch.com> | 2009-08-15 02:48:08 -0400 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2009-08-15 02:48:08 -0400 |
commit | 6d558e12b04a468ec630d282265f033f54f6fa41 (patch) | |
tree | 0cc4c7b97ff6a44045bed1d42870c8a100cf373b | |
parent | 94349f64d16ed2159cc944a2af7a3fcaedd9c9d9 (diff) | |
download | plan9port-6d558e12b04a468ec630d282265f033f54f6fa41.tar.gz plan9port-6d558e12b04a468ec630d282265f033f54f6fa41.tar.bz2 plan9port-6d558e12b04a468ec630d282265f033f54f6fa41.zip |
dial: reject dial to * (aka 0.0.0.0)
fixes #15 http://code.swtch.com/plan9port/issues/15
http://codereview.appspot.com/107043
-rw-r--r-- | src/lib9/dial.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib9/dial.c b/src/lib9/dial.c index 88dcf564..5550e9e1 100644 --- a/src/lib9/dial.c +++ b/src/lib9/dial.c @@ -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; |