diff options
author | Pierre Ossman <ossman@cendio.se> | 2011-03-02 12:44:46 +0000 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2011-03-02 12:44:46 +0000 |
commit | 3270a59ae45a88054e8e18557a56614a5b986d0c (patch) | |
tree | 38db8474ade9a59b00f01502ed38d2d1badb778f /common/rfb/Hostname.h | |
parent | 660f1081d7cd1e4c763675ace8181ed34d377d34 (diff) | |
download | tigervnc-3270a59ae45a88054e8e18557a56614a5b986d0c.tar.gz tigervnc-3270a59ae45a88054e8e18557a56614a5b986d0c.zip |
Catch when no host was specified a bit more gracefully.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4308 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'common/rfb/Hostname.h')
-rw-r--r-- | common/rfb/Hostname.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/common/rfb/Hostname.h b/common/rfb/Hostname.h index ebdf816f..f70347f9 100644 --- a/common/rfb/Hostname.h +++ b/common/rfb/Hostname.h @@ -28,6 +28,8 @@ namespace rfb { static void getHostAndPort(const char* hi, char** host, int* port, int basePort=5900) { CharArray portBuf; CharArray hostBuf; + if (hi == NULL) + throw rdr::Exception("NULL host specified"); if (hi[0] == '[') { if (!strSplit(&hi[1], ']', &hostBuf.buf, &portBuf.buf)) throw rdr::Exception("unmatched [ in host"); |