Home
last modified time | relevance | path

Searched refs:nameLen (Results 1 – 25 of 30) sorted by relevance

12

/third_party/expat/
D05-backport-CVE-2022-23990-lib-Prevent-integer-overflow-in-doProlog-CVE-2022-23.patch7 The change from "int nameLen" to "size_t nameLen"
8 addresses the overflow on "nameLen++" in code
9 "for (; name[nameLen++];)" right above the second
23 - int nameLen;
24 + size_t nameLen;
29 nameLen = 0;
30 for (; name[nameLen++];)
32 - dtd->contentStringLen += nameLen;
35 + if (nameLen > UINT_MAX - dtd->contentStringLen) {
39 + dtd->contentStringLen += (unsigned)nameLen;
D10-backport-CVE-2022-25315-Prevent-integer-overflow-in-storeRawNames.patch121 int nameLen = sizeof(XML_Char) * (tag->name.strLen + 1);
123 char *rawNameBuf = tag->buf + nameLen;
130 - bufSize = nameLen + ROUND_UP(tag->rawNameLength, sizeof(XML_Char));
133 + if (rawNameLen > (size_t)INT_MAX - nameLen)
135 + bufSize = nameLen + (int)rawNameLen;
/third_party/skia/src/utils/win/
DSkDWrite.cpp76 HRESULT sk_wchar_to_skstring(WCHAR* name, int nameLen, SkString* skname) { in sk_wchar_to_skstring() argument
77 int len = WideCharToMultiByte(CP_UTF8, 0, name, nameLen, nullptr, 0, nullptr, nullptr); in sk_wchar_to_skstring()
79 if (nameLen <= 0) { in sk_wchar_to_skstring()
88 …len = WideCharToMultiByte(CP_UTF8, 0, name, nameLen, skname->writable_str(), len, nullptr, nullptr… in sk_wchar_to_skstring()
110 UINT32 nameLen; in sk_get_locale_string() local
111 HRM(names->GetStringLength(nameIndex, &nameLen), "Could not get name length."); in sk_get_locale_string()
113 SkSMallocWCHAR name(nameLen + 1); in sk_get_locale_string()
114 HRM(names->GetString(nameIndex, name.get(), nameLen + 1), "Could not get string."); in sk_get_locale_string()
116 HR(sk_wchar_to_skstring(name.get(), nameLen, skname)); in sk_get_locale_string()
DSkDWrite.h36 HRESULT sk_wchar_to_skstring(WCHAR* name, int nameLen, SkString* skname);
/third_party/skia/src/ports/
DSkFontMgr_config_parser.cpp149 size_t nameLen = strlen(name); in __anon0430dd050202() local
150 if (MEMEQ("tag", name, nameLen)) { in __anon0430dd050202()
168 } else if (MEMEQ("stylevalue", name, nameLen)) { in __anon0430dd050202()
199 size_t nameLen = strlen(name); in __anon0430dd050302() local
200 if (MEMEQ("weight", name, nameLen)) { in __anon0430dd050302()
204 } else if (MEMEQ("style", name, nameLen)) { in __anon0430dd050302()
211 } else if (MEMEQ("index", name, nameLen)) { in __anon0430dd050302()
215 } else if (MEMEQ("fallbackFor", name, nameLen)) { in __anon0430dd050302()
264 size_t nameLen = strlen(name); in __anon0430dd050702() local
266 if (MEMEQ("name", name, nameLen)) { in __anon0430dd050702()
[all …]
DSkFontMgr_android_parser.cpp182 size_t nameLen = strlen(name); in __anon148ae0b00102() local
183 if (MEMEQ("tag", name, nameLen)) { in __anon148ae0b00102()
201 } else if (MEMEQ("stylevalue", name, nameLen)) { in __anon148ae0b00102()
232 size_t nameLen = strlen(name); in __anon148ae0b00202() local
233 if (MEMEQ("weight", name, nameLen)) { in __anon148ae0b00202()
237 } else if (MEMEQ("style", name, nameLen)) { in __anon148ae0b00202()
244 } else if (MEMEQ("index", name, nameLen)) { in __anon148ae0b00202()
248 } else if (MEMEQ("fallbackFor", name, nameLen)) { in __anon148ae0b00202()
297 size_t nameLen = strlen(name); in __anon148ae0b00602() local
299 if (MEMEQ("name", name, nameLen)) { in __anon148ae0b00602()
[all …]
DSkFontMgr_FontConfigInterface.cpp71 Request(const char* name, size_t nameLen, const SkFontStyle& style) : fStyle(style) { in Request()
81 size_t contentLen = SkAlign4(nameLen); in Request()
82 sk_careful_memcpy(content, name, nameLen); in Request()
83 sk_bzero(content + nameLen, contentLen - nameLen); in Request()
92 size_t nameLen = name ? strlen(name) : 0; in Create() local
93 size_t contentLen = SkAlign4(nameLen); in Create()
95 return new (storage) Request(name, nameLen, style); in Create()
/third_party/skia/third_party/externals/icu/source/tools/ctestfw/
Dctest.c69 static TestNode *createTestNode(const char* name, int32_t nameLen);
76 int* nameLen,
152 int* nameLen, in getNextLevel() argument
161 *nameLen = (int)((*nextName) - name); in getNextLevel()
163 strncpy(n, name, *nameLen); in getNextLevel()
164 n[*nameLen] = 0; in getNextLevel()
168 *nameLen = (int)strlen(name); in getNextLevel()
172 static TestNode *createTestNode(const char* name, int32_t nameLen) in createTestNode() argument
176 newNode = (TestNode*)malloc(sizeof(TestNode) + (nameLen + 1)); in createTestNode()
182 strncpy( newNode->name, name, nameLen ); in createTestNode()
[all …]
/third_party/icu/icu4c/source/tools/ctestfw/
Dctest.c70 static TestNode *createTestNode(const char* name, int32_t nameLen);
77 int* nameLen,
154 int* nameLen, in getNextLevel() argument
163 *nameLen = (int)((*nextName) - name); in getNextLevel()
165 strncpy(n, name, *nameLen); in getNextLevel()
166 n[*nameLen] = 0; in getNextLevel()
170 *nameLen = (int)strlen(name); in getNextLevel()
174 static TestNode *createTestNode(const char* name, int32_t nameLen) in createTestNode() argument
178 newNode = (TestNode*)malloc(sizeof(TestNode) + (nameLen + 1)); in createTestNode()
184 strncpy( newNode->name, name, nameLen ); in createTestNode()
[all …]
/third_party/elfio/elfio/
Delfio_note.hpp105 Elf_Word nameLen = (Elf_Word)name.size() + 1; in add_note() local
106 Elf_Word nameLenConv = convertor( nameLen ); in add_note()
116 if ( nameLen % align != 0 ) { in add_note()
117 buffer.append( pad, (size_t)align - nameLen % align ); in add_note()
/third_party/vk-gl-cts/executor/
DxeTestCase.cpp108 int nameLen = 0; in getFullPath() local
113 nameLen += (int)curNode->m_name.length(); in getFullPath()
118 nameLen += 1; in getFullPath()
125 dst.resize(nameLen); in getFullPath()
128 int pos = nameLen; in getFullPath()
/third_party/node/deps/icu-small/source/i18n/
Danytrans.cpp339 int32_t nameLen = name.length(); in scriptNameToCode() local
340 UBool isInvariant = uprv_isInvariantUString(name.getBuffer(), nameLen); in scriptNameToCode()
343 name.extract(0, nameLen, buf, (int32_t)sizeof(buf), US_INV); in scriptNameToCode()
/third_party/icu/icu4c/source/i18n/
Danytrans.cpp339 int32_t nameLen = name.length(); in scriptNameToCode() local
340 UBool isInvariant = uprv_isInvariantUString(name.getBuffer(), nameLen); in scriptNameToCode()
343 name.extract(0, nameLen, buf, (int32_t)sizeof(buf), US_INV); in scriptNameToCode()
/third_party/skia/third_party/externals/icu/source/i18n/
Danytrans.cpp339 int32_t nameLen = name.length(); in scriptNameToCode() local
340 UBool isInvariant = uprv_isInvariantUString(name.getBuffer(), nameLen); in scriptNameToCode()
343 name.extract(0, nameLen, buf, (int32_t)sizeof(buf), US_INV); in scriptNameToCode()
/third_party/lzma/CPP/7zip/Archive/7z/
D7zHandler.cpp496 unsigned nameLen = MyStringLen(name); in SetMethodToProp() local
498 unsigned totalLen = nameLen + propsLen; in SetMethodToProp()
509 char *dest = temp + pos + nameLen; in SetMethodToProp()
/third_party/lzma/C/Util/SfxSetup/
DSfxSetup.c458 unsigned nameLen = FindExt(temp + nameStartPos, &extLen); in main() local
460 unsigned namePrice = FindItem(kNames, sizeof(kNames) / sizeof(kNames[0]), name, nameLen); in main()
/third_party/vk-gl-cts/external/openglcts/modules/common/
DglcUniformBlockCase.cpp1118 int nameLen; in getGLUniformLayout() local
1122 gl.getActiveUniformBlockiv(program, (deUint32)blockNdx, GL_UNIFORM_BLOCK_NAME_LENGTH, &nameLen); in getGLUniformLayout()
1128 std::vector<char> nameBuf(nameLen > 0 ? nameLen : 1); in getGLUniformLayout()
1184 glw::GLsizei nameLen = 0; in getGLUniformLayout() local
1188 …gl.getActiveUniform(program, (deUint32)uniformNdx, (glw::GLsizei)nameBuf.size(), &nameLen, &size, … in getGLUniformLayout()
1194 if (nameLen + 1 != nameLengths[uniformNdx] || size != sizes[uniformNdx] || in getGLUniformLayout()
/third_party/vk-gl-cts/modules/gles31/functional/
Des31fSSBOLayoutCase.cpp1397 const int nameLen = returnValues[2]; in getGLBufferLayout() local
1399 vector<char> name (nameLen); in getGLBufferLayout()
1404 if (retLen+1 != nameLen) in getGLBufferLayout()
1406 if (name[nameLen-1] != 0) in getGLBufferLayout()
1407 …ORAGE_BLOCK) returned invalid name. Expected null terminator at index " + de::toString(nameLen-1)); in getGLBufferLayout()
1460 const int nameLen = returnValues[9]; in getGLBufferLayout() local
1462 vector<char> name (nameLen); in getGLBufferLayout()
1467 if (retLen+1 != nameLen) in getGLBufferLayout()
1469 if (name[nameLen-1] != 0) in getGLBufferLayout()
1470 …ER_VARIABLE) returned invalid name. Expected null terminator at index " + de::toString(nameLen-1)); in getGLBufferLayout()
/third_party/icu/icu4c/source/common/
Dudata.cpp334 int32_t nameLen; in udata_cacheDataItem() local
360 nameLen = (int32_t)uprv_strlen(baseName); in udata_cacheDataItem()
361 newElement->name = (char *)uprv_malloc(nameLen+1); in udata_cacheDataItem()
/third_party/node/deps/icu-small/source/common/
Dudata.cpp334 int32_t nameLen; in udata_cacheDataItem() local
360 nameLen = (int32_t)uprv_strlen(baseName); in udata_cacheDataItem()
361 newElement->name = (char *)uprv_malloc(nameLen+1); in udata_cacheDataItem()
/third_party/vk-gl-cts/modules/glshared/
DglsUniformBlockCase.cpp1186 int nameLen; in getGLUniformLayout() local
1190 gl.getActiveUniformBlockiv(program, (deUint32)blockNdx, GL_UNIFORM_BLOCK_NAME_LENGTH, &nameLen); in getGLUniformLayout()
1196 std::vector<char> nameBuf(nameLen > 0 ? nameLen : 1); in getGLUniformLayout()
1243 glw::GLsizei nameLen = 0; in getGLUniformLayout() local
1247 …gl.getActiveUniform(program, (deUint32)uniformNdx, (glw::GLsizei)nameBuf.size(), &nameLen, &size, … in getGLUniformLayout()
1252 if (nameLen+1 != nameLengths[uniformNdx] || in getGLUniformLayout()
/third_party/skia/third_party/externals/icu/source/common/
Dudata.cpp334 int32_t nameLen; in udata_cacheDataItem() local
360 nameLen = (int32_t)uprv_strlen(baseName); in udata_cacheDataItem()
361 newElement->name = (char *)uprv_malloc(nameLen+1); in udata_cacheDataItem()
/third_party/skia/src/core/
DSkPictureRecord.cpp67 size_t nameLen = SkWriter32::WriteStringSize(name); in onMarkCTM() local
68 size_t size = sizeof(kUInt32Size) + nameLen; // op + name in onMarkCTM()
/third_party/python/Modules/expat/
Dxmlparse.c2558 int nameLen = sizeof(XML_Char) * (tag->name.strLen + 1); in storeRawNames() local
2559 char *rawNameBuf = tag->buf + nameLen; in storeRawNames()
2570 bufSize = nameLen + ROUND_UP(tag->rawNameLength, sizeof(XML_Char)); in storeRawNames()
2588 rawNameBuf = temp + nameLen; in storeRawNames()
5239 int nameLen; in doProlog() local
5252 nameLen = 0; in doProlog()
5253 for (; name[nameLen++];) in doProlog()
5255 dtd->contentStringLen += nameLen; in doProlog()
/third_party/skia/third_party/externals/expat/expat/lib/
Dxmlparse.c2606 int nameLen = sizeof(XML_Char) * (tag->name.strLen + 1); in storeRawNames() local
2607 char *rawNameBuf = tag->buf + nameLen; in storeRawNames()
2618 bufSize = nameLen + ROUND_UP(tag->rawNameLength, sizeof(XML_Char)); in storeRawNames()
2636 rawNameBuf = temp + nameLen; in storeRawNames()
5321 int nameLen; in doProlog() local
5334 nameLen = 0; in doProlog()
5335 for (; name[nameLen++];) in doProlog()
5337 dtd->contentStringLen += nameLen; in doProlog()

12