diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:54:06 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:54:06 +0000 |
commit | 1d38d0e9bf0f1b753ce047dba2707ca68840af9f (patch) | |
tree | c93bce88f35af15978beb1d938676010d00213f6 /apt-pkg/contrib/strutl.cc | |
parent | 099a47599805a7050bc788a4a94f7f9bae929554 (diff) |
Fixed a uri parser bug
Author: jgg
Date: 1999-06-27 04:55:54 GMT
Fixed a uri parser bug
Diffstat (limited to 'apt-pkg/contrib/strutl.cc')
-rw-r--r-- | apt-pkg/contrib/strutl.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc index a1c605886..6c3009462 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: strutl.cc,v 1.25 1999/06/24 04:34:25 jgg Exp $ +// $Id: strutl.cc,v 1.26 1999/06/27 04:55:54 jgg Exp $ /* ###################################################################### String Util - Some usefull string functions. @@ -707,6 +707,8 @@ void URI::CopyFrom(string U) // Find the colon... I = FirstColon + 1; + if (I > SingleSlash) + I = SingleSlash; for (; I < SingleSlash && *I != ':'; I++); string::const_iterator SecondColon = I; @@ -728,7 +730,7 @@ void URI::CopyFrom(string U) Password = string(U,SecondColon - U.begin() + 1,At - SecondColon - 1); } - // Now we parse off a pot number from the hostname + // Now we parse off a port number from the hostname Port = 0; string::size_type Pos = Host.rfind(':'); if (Pos == string::npos) |