NEW187246
String buffer is reallocated in FileSystem::fileSystemRepresentation.
https://bugs.webkit.org/show_bug.cgi?id=187246
Summary String buffer is reallocated in FileSystem::fileSystemRepresentation.
Per Arne Vollan
Reported 2018-07-02 07:19:13 PDT
The length of the new string buffer is computed by CFStringGetMaximumSizeOfFileSystemRepresentation, which over-estimates the required length. To save space, the string buffer is currently reallocated before returning the string. Since the returned string is never stored by any callers as far as I can see, reallocating is not necessary. The caller can reallocate the buffer if the string is going to be stored.
Attachments
Patch (2.51 KB, patch)
2018-07-02 07:24 PDT, Per Arne Vollan
ap: review-
Per Arne Vollan
Comment 1 2018-07-02 07:24:19 PDT
Alexey Proskuryakov
Comment 2 2018-07-03 02:26:30 PDT
Comment on attachment 344100 [details] Patch svn blame points to http://trac.webkit.org/r149531, which explains why this is necessary.
Per Arne Vollan
Comment 3 2018-07-03 07:44:58 PDT
(In reply to Alexey Proskuryakov from comment #2) > Comment on attachment 344100 [details] > Patch > > svn blame points to http://trac.webkit.org/r149531, which explains why this > is necessary. Ah, I see. Thanks for reviewing!
Note You need to log in before you can comment on or make changes to this bug.