35 #define SIZE_MAX ((size_t) -1)
39#define MAX_FILL_DENOM 8
40#define MIN_HASH_SIZE 8
41#define MAX_HASH_SIZE (1u << 31)
246 *(
pool->free++) =
':';
279#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
300 if ((dict !=
NULL) && (sub !=
NULL)) {
318 if (dict ==
NULL)
return -1;
383 if ((
str >= &
pool->array[0]) && (str <= pool->
free))
471 for (
i = 0;
i < maxLen &&
data[
i];
i++) {
484 size_t *pplen,
size_t *plen) {
497 for (
i = 0;
name[
i] != 0;
i++) {
517#define HASH_ROL31(x,n) ((x) << (n) | ((x) & 0x7FFFFFFF) >> (31 - (n)))
529 return((
v1 & 0xFFFFFFFF) | 0x80000000);
558 if (
entry->hashValue != 0) {
567 if (
entry->hashValue == hashValue) {
573 (
const char *)
name,
len) == 0) &&
591 }
while ((
entry->hashValue != 0) &&
622 oldsize = dict->
size;
626 oldend = &dict->
table[oldsize];
636 oldentry = dict->
table;
638 if (++oldentry >= oldend)
639 oldentry = dict->
table;
642 for (
i = 0;
i < oldsize;
i++) {
646 while (
entry->hashValue != 0) {
653 if (++oldentry >= oldend)
654 oldentry = dict->
table;
683 size_t maxLen,
len, plen, klen;
689 maxLen = (maybeLen < 0) ?
SIZE_MAX : (
size_t) maybeLen;
700 klen = plen + 1 +
len;
703 if ((dict->
limit > 0) && (klen >= dict->
limit))
716 unsigned subHashValue;
725 subHashValue, &found);
737 unsigned newSize,
mask, displ,
pos;
739 if (dict->
size == 0) {
744 newSize = dict->
size * 2;
757 while ((
entry->hashValue != 0) &&
777 if (
entry->hashValue != 0) {
785 }
while (
cur->hashValue != 0);
793 (
char *)
cur - (
char *) dict->
table);
804 entry->hashValue = hashValue;
911#ifdef XML_THREAD_LOCAL
912static XML_THREAD_LOCAL
int localRngInitialized = 0;
913static XML_THREAD_LOCAL
unsigned localRngState[2];
947 return(
result & 0xFFFFFFFF);
952#ifdef XML_THREAD_LOCAL
953 if (!localRngInitialized) {
957 localRngInitialized = 1;
_ACRTIMP int __cdecl strncmp(const char *, const char *, size_t)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLfloat GLfloat GLfloat v2
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
XMLPUBFUN void xmlMutexLock(xmlMutexPtr tok)
XMLPUBFUN void xmlMutexUnlock(xmlMutexPtr tok)
#define ATTRIBUTE_NO_SANITIZE_INTEGER
#define memcpy(s1, s2, n)
#define memmove(s1, s2, n)
static unsigned(__cdecl *hash_bstr)(bstr_t s)
XML_HIDDEN void xmlCleanupMutex(xmlMutexPtr mutex)
XML_HIDDEN void xmlInitMutex(xmlMutexPtr mutex)
xmlHashedString xmlDictLookupHashed(xmlDictPtr dict, const xmlChar *name, int len)
static const xmlChar * xmlDictAddQString(xmlDictPtr dict, const xmlChar *prefix, unsigned int plen, const xmlChar *name, unsigned int namelen)
unsigned xmlDictComputeHash(const xmlDict *dict, const xmlChar *string)
void xmlDictFree(xmlDictPtr dict)
static xmlMutex xmlDictMutex
const xmlChar * xmlDictExists(xmlDictPtr dict, const xmlChar *name, int len)
xmlDictPtr xmlDictCreateSub(xmlDictPtr sub)
ATTRIBUTE_NO_SANITIZE_INTEGER void xmlInitRandom(void)
static ATTRIBUTE_NO_SANITIZE_INTEGER unsigned xmlDictHashQName(unsigned seed, const xmlChar *prefix, const xmlChar *name, size_t *pplen, size_t *plen)
int xmlDictOwns(xmlDictPtr dict, const xmlChar *str)
struct _xmlDictStrings xmlDictStrings
void xmlCleanupDictInternal(void)
xmlDictStrings * xmlDictStringsPtr
ATTRIBUTE_NO_SANITIZE_INTEGER unsigned xmlDictCombineHash(unsigned v1, unsigned v2)
size_t xmlDictGetUsage(xmlDictPtr dict)
void xmlDictCleanup(void)
size_t xmlDictSetLimit(xmlDictPtr dict, size_t limit)
static ATTRIBUTE_NO_SANITIZE_INTEGER unsigned xoroshiro64ss(unsigned *s)
static ATTRIBUTE_NO_SANITIZE_INTEGER const xmlDictEntry * xmlDictLookupInternal(xmlDictPtr dict, const xmlChar *prefix, const xmlChar *name, int maybeLen, int update)
static ATTRIBUTE_NO_SANITIZE_INTEGER unsigned xmlDictHashName(unsigned seed, const xmlChar *data, size_t maxLen, size_t *plen)
int xmlDictReference(xmlDictPtr dict)
static xmlMutex xmlRngMutex
static int xmlDictGrow(xmlDictPtr dict, unsigned size)
const xmlChar * xmlDictQLookup(xmlDictPtr dict, const xmlChar *prefix, const xmlChar *name)
void xmlCleanupRandom(void)
static unsigned globalRngState[2]
int xmlDictSize(xmlDictPtr dict)
static const xmlChar * xmlDictAddString(xmlDictPtr dict, const xmlChar *name, unsigned int namelen)
int xmlInitializeDict(void)
void xmlInitDictInternal(void)
xmlDictPtr xmlDictCreate(void)
const xmlChar * xmlDictLookup(xmlDictPtr dict, const xmlChar *name, int len)
xmlHashedString xmlDictEntry
static ATTRIBUTE_NO_SANITIZE_INTEGER xmlDictEntry * xmlDictFindEntry(const xmlDict *dict, const xmlChar *prefix, const xmlChar *name, int len, unsigned hashValue, int *pfound)
XML_GLOBALS_PARSER XMLPUBFUN void xmlInitParser(void)
#define HASH_UPDATE(h1, h2, ch)
#define HASH_FINISH(h1, h2)
#define HASH_INIT(h1, h2, seed)
xmlDictStringsPtr strings
struct _xmlDict * subdict
Character const *const prefix
XMLPUBFUN int xmlStrQEqual(const xmlChar *pref, const xmlChar *name, const xmlChar *str)