Index: src/sfnt/SkOTUtils.cpp |
diff --git a/src/sfnt/SkOTUtils.cpp b/src/sfnt/SkOTUtils.cpp |
index 0e009528b4dcd1aa14f70a22f611cdd684ee3088..1d3843d061a043adb46a525cbcd718212cd45118 100644 |
--- a/src/sfnt/SkOTUtils.cpp |
+++ b/src/sfnt/SkOTUtils.cpp |
@@ -129,7 +129,7 @@ SkData* SkOTUtils::RenameFont(SkStream* fontData, const char* fontName, int font |
nameRecords[i].languageID.windows.value = SkOTTableName::Record::LanguageID::Windows::English_UnitedStates; |
nameRecords[i].nameID.predefined.value = namesToCreate[i]; |
nameRecords[i].offset = SkEndian_SwapBE16(0); |
- nameRecords[i].length = SkEndian_SwapBE16(fontNameLen * sizeof(wchar_t)); |
+ nameRecords[i].length = SkEndian_SwapBE16(SkToU16(fontNameLen * sizeof(wchar_t))); |
} |
SK_OT_USHORT* nameString = reinterpret_cast<SK_OT_USHORT*>(data + originalDataSize + stringOffset); |