1 Index: ktelnetservice.cpp
2 ===================================================================
3 RCS file: /home/kde/kdelibs/kio/misc/ktelnetservice.cpp,v
4 retrieving revision 1.3.2.2
5 diff -u -p -r1.3.2.2 ktelnetservice.cpp
6 --- kio/misc/ktelnetservice.cpp 31 Mar 2003 09:13:55 -0000 1.3.2.2
7 +++ kio/misc/ktelnetservice.cpp 13 May 2004 15:12:00 -0000
8 @@ -68,10 +68,19 @@ int main(int argc, char **argv)
13 if (!url.host().isEmpty())
14 - cmd << url.host(); // telnet://host
15 + host = url.host(); // telnet://host
16 else if (!url.path().isEmpty())
17 - cmd << url.path(); // telnet:host
18 + host = url.path(); // telnet:host
20 + if (host.isEmpty() || host.startsWith("-"))
22 + kdError() << "Invalid hostname " << host << endl;
29 cmd << QString::number(url.port());