Changeset 104947 in webkit


Ignore:
Timestamp:
Jan 13, 2012 9:58:10 AM (12 years ago)
Author:
ap@apple.com
Message:

CFURLRef to KURL conversion shouldn't turn raw paths into file URLs
https://bugs.webkit.org/show_bug.cgi?id=76251

Reviewed by Dan Bernstein.

  • platform/cf/KURLCFNet.cpp: (WebCore::KURL::KURL): Removed the offending code.
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r104945 r104947  
     12012-01-13  Alexey Proskuryakov  <ap@apple.com>
     2
     3        CFURLRef to KURL conversion shouldn't turn raw paths into file URLs
     4        https://bugs.webkit.org/show_bug.cgi?id=76251
     5
     6        Reviewed by Dan Bernstein.
     7
     8        * platform/cf/KURLCFNet.cpp: (WebCore::KURL::KURL): Removed the offending code.
     9
    1102012-01-13  Konrad Piascik  <kpiascik@rim.com>
    211
  • trunk/Source/WebCore/platform/cf/KURLCFNet.cpp

    r101713 r104947  
    4646
    4747    CFIndex bytesLength = CFURLGetBytes(url, 0, 0);
    48     Vector<char, 512> buffer(bytesLength + 6); // 5 for "file:", 1 for null character to end C string
    49     char* bytes = &buffer[5];
     48    Vector<char, 512> buffer(bytesLength + 1);
     49    char* bytes = &buffer[0];
    5050    CFURLGetBytes(url, reinterpret_cast<UInt8*>(bytes), bytesLength);
    5151    bytes[bytesLength] = '\0';
    52     if (bytes[0] != '/') {
    53         parse(bytes);
    54         return;
    55     }
    56 
    57     buffer[0] = 'f';
    58     buffer[1] = 'i';
    59     buffer[2] = 'l';
    60     buffer[3] = 'e';
    61     buffer[4] = ':';
    62 
    63     parse(buffer.data());
     52    parse(bytes);
    6453}
    6554
Note: See TracChangeset for help on using the changeset viewer.