Changeset 162544 in webkit
- Timestamp:
- Jan 22, 2014 11:55:11 AM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r162540 r162544 1 2014-01-22 peavo@outlook.com <peavo@outlook.com> 2 3 Crashes in setTextForIterator 4 https://bugs.webkit.org/show_bug.cgi?id=127424 5 6 Reviewed by Brent Fulgham. 7 8 * platform/text/icu/UTextProviderLatin1.cpp: 9 (WebCore::uTextLatin1Clone): Provide correct buffer size in utext_setup function call. 10 (WebCore::uTextLatin1Access): Give correct buffer size to memset call. 11 (WebCore::openLatin1UTextProvider): Ditto. 12 1 13 2014-01-22 Jer Noble <jer.noble@apple.com> 2 14 -
trunk/Source/WebCore/platform/text/icu/UTextProviderLatin1.cpp
r161848 r162544 68 68 return 0; 69 69 70 UText* result = utext_setup(destination, sizeof(UChar) * (UTextWithBufferInlineCapacity + 1), status);70 UText* result = utext_setup(destination, sizeof(UChar) * UTextWithBufferInlineCapacity, status); 71 71 if (U_FAILURE(*status)) 72 72 return destination; … … 83 83 result->pFuncs = &uTextLatin1Funcs; 84 84 result->chunkContents = (UChar*)result->pExtra; 85 memset(const_cast<UChar*>(result->chunkContents), 0, sizeof(UChar) * (UTextWithBufferInlineCapacity + 1));85 memset(const_cast<UChar*>(result->chunkContents), 0, sizeof(UChar) * UTextWithBufferInlineCapacity); 86 86 87 87 return result; … … 133 133 uText->chunkNativeLimit = length; 134 134 135 uText->chunkNativeStart = uText->chunkNativeLimit - 135 uText->chunkNativeStart = uText->chunkNativeLimit - UTextWithBufferInlineCapacity; 136 136 if (uText->chunkNativeStart < 0) 137 137 uText->chunkNativeStart = 0; … … 229 229 text->pFuncs = &uTextLatin1Funcs; 230 230 text->chunkContents = (UChar*)text->pExtra; 231 memset(const_cast<UChar*>(text->chunkContents), 0, sizeof(UChar) * (UTextWithBufferInlineCapacity + 1));231 memset(const_cast<UChar*>(text->chunkContents), 0, sizeof(UChar) * UTextWithBufferInlineCapacity); 232 232 233 233 return text;
Note: See TracChangeset
for help on using the changeset viewer.