Index: ktelnetservice.cpp =================================================================== RCS file: /home/kde/kdelibs/kio/misc/ktelnetservice.cpp,v retrieving revision 1.2.2.1 diff -u -p -r1.2.2.1 ktelnetservice.cpp --- kio/misc/ktelnetservice.cpp 31 Oct 2002 21:57:15 -0000 1.2.2.1 +++ kio/misc/ktelnetservice.cpp 13 May 2004 15:11:39 -0000 @@ -63,7 +63,17 @@ int main(int argc, char **argv) cmd << "-l"; cmd << url.user(); } - cmd << url.host(); + + host = url.host(); + + if (host.isEmpty() || host.startsWith("-")) + { + kdError() << "Invalid hostname " << host << endl; + return 2; + } + + cmd << host; + if (url.port()) cmd << QString::number(url.port());