[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
kocienda
kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:13:15 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit a59e26d7e49479d39848b9064f2e5b17a092b7b4
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Nov 18 00:59:15 2003 +0000
Reviewed by Maciej
<rdar://problem/3487079>: Some scheme checks in KURL do not verify
first char is a legal first char for a scheme
* kwq/KWQKURL.mm:
(KURL::KURL): Added some additional checks when looking through
strings looking for schemes. Now the first character is checked
for validity as a first character in a scheme.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5555 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index b40e0a5..d5efd79 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,15 @@
+2003-11-17 Ken Kocienda <kocienda at apple.com>
+
+ Reviewed by Maciej
+
+ <rdar://problem/3487079>: Some scheme checks in KURL do not verify
+ first char is a legal first char for a scheme
+
+ * kwq/KWQKURL.mm:
+ (KURL::KURL): Added some additional checks when looking through
+ strings looking for schemes. Now the first character is checked
+ for validity as a first character in a scheme.
+
2003-11-17 David Hyatt <hyatt at apple.com>
Fix for 3486441, don't use the visibleWidth when computing the containingBlockWidth(). No need to
diff --git a/WebCore/kwq/KWQKURL.mm b/WebCore/kwq/KWQKURL.mm
index dfdf2ce..2aad083 100644
--- a/WebCore/kwq/KWQKURL.mm
+++ b/WebCore/kwq/KWQKURL.mm
@@ -289,14 +289,16 @@ KURL::KURL(const KURL &base, const QString &relative, const QTextCodec *codec)
// what these protocols expect.
if (codec) {
QString protocol;
- for (uint i = 0; i < relative.length(); i++) {
- char p = relative.at(i).latin1();
- if (!isSchemeCharOrColon(p)) {
- break;
- }
- if (p == ':') {
- protocol = relative.left(i);
- break;
+ if (relative.length() > 0 && isSchemeFirstChar(relative.at(0).latin1())) {
+ for (uint i = 1; i < relative.length(); i++) {
+ char p = relative.at(i).latin1();
+ if (!isSchemeCharOrColon(p)) {
+ break;
+ }
+ if (p == ':') {
+ protocol = relative.left(i);
+ break;
+ }
}
}
if (!protocol) {
@@ -319,18 +321,17 @@ KURL::KURL(const KURL &base, const QString &relative, const QTextCodec *codec)
// absolute URI if possible, using the "leftmost, longest"
// algorithm. If the URI reference is absolute it will have a
// scheme, meaning that it will have a colon before the first
- // non-scheme element. "/", "?" and "#" are used to detect the
- // start of a path segment, a query or a fragment ID, which would
- // indicate no scheme had been found. isPathSegmentEndChar
- // tests for those three characters or NULL.
-
- for (const char *p = str; isSchemeCharOrColon(*p); ++p) {
- if (*p == ':') {
- absolute = true;
- break;
- }
+ // non-scheme element.
+ const char *p = str;
+ if (isSchemeFirstChar(*p)) {
+ for (++p; isSchemeCharOrColon(*p); ++p) {
+ if (*p == ':') {
+ absolute = true;
+ break;
+ }
+ }
}
-
+
if (absolute) {
parse(str, allASCII ? &relative : 0);
} else {
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list