Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Unified Diff: src/uri.js

Issue 6349105: Fix compliance bug in decodeURI/decodeURIComponent. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/uri.js
diff --git a/src/uri.js b/src/uri.js
index 3adab83d87358d9065c4ba16340444db4250eee6..179fa9286340bdfc183d0131324e10b0b6228311 100644
--- a/src/uri.js
+++ b/src/uri.js
@@ -205,7 +205,7 @@ function Decode(uri, reserved) {
octets[0] = cc;
if (k + 3 * (n - 1) >= uriLength) throw new $URIError("URI malformed");
for (var i = 1; i < n; i++) {
- k++;
+ if (uri.charAt(++k) != '%') throw new $URIError("URI malformed");
octets[i] = URIHexCharsToCharCode(uri.charAt(++k), uri.charAt(++k));
}
index = URIDecodeOctets(octets, result, index);
@@ -412,4 +412,3 @@ function SetupURI() {
}
SetupURI();
-
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698