]> git.pld-linux.org Git - packages/kdelibs.git/blob - post-3.1.5-kdelibs-ktelnetservice.patch
- update md5
[packages/kdelibs.git] / post-3.1.5-kdelibs-ktelnetservice.patch
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)
9                 cmd << url.user();
10         }
11  
12 +        QString host;
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
19 +
20 +        if (host.isEmpty() || host.startsWith("-"))
21 +        {
22 +            kdError() << "Invalid hostname " << host << endl;
23 +            return 2;
24 +        }
25 +
26 +        cmd << host;
27          
28         if (url.port())
29                 cmd << QString::number(url.port());
30
This page took 0.031642 seconds and 3 git commands to generate.