Bug 380994 - "Fix for bug 367428 lets through escaped slashes on Linux (windows too on trunk)" (incremental patch on top of what's checked in) [r=biesi]
authorDaniel Veditz <dveditz@cruzio.com>
Wed, 01 Oct 2008 00:21:05 -0500
changeset 20027 1eccc541661cf86ef522cbfcbaf858df1682dc78
parent 20026 6dad95d60106a7c3b0c52707f14fe8e519c13b85
child 20028 c61681813a11306289f4a0297a47e36b2dd85d63
push id2584
push userreed@reedloden.com
push dateWed, 01 Oct 2008 05:21:09 +0000
treeherdermozilla-central@1eccc541661c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbiesi
bugs380994, 367428
milestone1.9.1b1pre
Bug 380994 - "Fix for bug 367428 lets through escaped slashes on Linux (windows too on trunk)" (incremental patch on top of what's checked in) [r=biesi]
netwerk/protocol/res/src/nsResProtocolHandler.cpp
--- a/netwerk/protocol/res/src/nsResProtocolHandler.cpp
+++ b/netwerk/protocol/res/src/nsResProtocolHandler.cpp
@@ -240,17 +240,17 @@ nsResProtocolHandler::NewURI(const nsACS
     const char *src = aSpec.BeginReading();
     const char *end = aSpec.EndReading();
     const char *last = src;
 
     spec.SetCapacity(aSpec.Length()+1);
     for ( ; src < end; ++src) {
         if (*src == '%' && (src < end-2) && *(src+1) == '2') {
            char ch = '\0';
-           if (*(src+2) == 'f' || *(src+1) == 'F')
+           if (*(src+2) == 'f' || *(src+2) == 'F')
              ch = '/';
            else if (*(src+2) == 'e' || *(src+2) == 'E')
              ch = '.';
 
            if (ch) {
              if (last < src)
                spec.Append(last, src-last);
              spec.Append(ch);