[webkit-changes] cvs commit: WebCore/kwq KWQKURL.mm

John sullivan at opensource.apple.com
Tue Nov 1 09:21:43 PST 2005


sullivan    05/11/01 09:21:43

  Modified:    .        ChangeLog
               kwq      KWQKURL.mm
  Log:
          Change by Alexey Proskuryakov, reviewed by Darin Adler.
  
          * kwq/KWQKURL.mm:
          (encodeRelativeString):
          don't use strdup, as it has problems with a curly quote in the string
  
  Revision  Changes    Path
  1.319     +8 -0      WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.318
  retrieving revision 1.319
  diff -u -r1.318 -r1.319
  --- ChangeLog	1 Nov 2005 16:59:40 -0000	1.318
  +++ ChangeLog	1 Nov 2005 17:21:39 -0000	1.319
  @@ -1,3 +1,11 @@
  +2005-11-01  John Sullivan  <sullivan at apple.com>
  +
  +        Change by Alexey Proskuryakov, reviewed by Darin Adler.
  +
  +        * kwq/KWQKURL.mm:
  +        (encodeRelativeString):
  +        don't use strdup, as it has problems with a curly quote in the string
  +
   2005-11-01  Anders Carlsson  <andersca at mac.com>
   
           Reviewed by Darin.
  
  
  
  1.95      +4 -1      WebCore/kwq/KWQKURL.mm
  
  Index: KWQKURL.mm
  ===================================================================
  RCS file: /cvs/root/WebCore/kwq/KWQKURL.mm,v
  retrieving revision 1.94
  retrieving revision 1.95
  diff -u -r1.94 -r1.95
  --- KWQKURL.mm	19 Oct 2005 00:03:46 -0000	1.94
  +++ KWQKURL.mm	1 Nov 2005 17:21:42 -0000	1.95
  @@ -1713,7 +1713,10 @@
       }
       if (pathEnd == -1) {
           QCString decoded = pathCodec->fromUnicode(s);
  -        strBuffer = strdup(decoded);
  +        int decodedLength = decoded.length();
  +        strBuffer = static_cast<char *>(fastMalloc(decodedLength + 1));
  +        memcpy(strBuffer, decoded, decodedLength);
  +        strBuffer[decodedLength] = 0;
       } else {
           QCString pathDecoded = pathCodec->fromUnicode(s.left(pathEnd));
           QCString otherDecoded = otherCodec->fromUnicode(s.mid(pathEnd));
  
  
  



More information about the webkit-changes mailing list