Lines Matching +defs:a +defs:code

47    a  copy  of  this  software   and  associated  documentation  files  (the
71 # error XML_GE (for general entities) must be defined, non-empty, either 1 or 0 (0 to disable, 1 to enable; 1 is a common default)
80 # error XML_CONTEXT_BYTES must be defined, non-empty and >=0 (0 to disable, >=1 to enable; 1024 is a common default)
165 If you have reasons to patch this detection code away or need changes \
166 to the build system, please open a bug. Thank you!
214 /* Round up n to be a multiple of sz, where sz is a power of 2. */
220 #define EXPAT_MIN(a, b) (((a) < (b)) ? (a) : (b))
244 /* For probing (after a collision) we need a step size relative prime
245 to the hash table size, which is a power of 2. We use double-hashing,
246 since we can calculate a second hash value cheaply by taking those bits
250 it odd, since odd numbers are always relative prime to a power of 2.
262 #define INIT_TAG_BUF_SIZE 32 /* must be a multiple of sizeof(XML_Char) */
297 encodings. The memory buffer 'buf' is a separately-allocated
305 A parser reuses these structures, maintaining a list of allocated
306 TAG objects in a free list.
396 /* false once a parameter entity reference has been skipped */
1007 // Heuristic: don't try to parse a partial token again until the amount of
1010 // ...but *do* try anyway if we're close to causing a reallocation.
1018 // m_lastBufferRequestSize is never assigned a value < 0, so the cast is ok
1954 /* Detect overflow (a+b > MAX <==> b > MAX-a) */
1961 // though this isn't a buffer request, we assume that `len` is the app's
2208 /* This must be a brand new buffer with no data in it yet */
2221 /* This must be a brand new buffer with no data in it yet */
2429 XML_ErrorString(enum XML_Error code) {
2430 switch (code) {
2478 return XML_L("unexpected parser state - please send a bug report");
2524 "a successful prior call to function XML_GetBuffer is required");
2541 a macro, then rescan for more expansions. Thus, we use V2 to expand
2546 #define V1(a, b, c) XML_L(#a) XML_L(".") XML_L(#b) XML_L(".") XML_L(#c)
2547 #define V2(a, b, c) XML_L("expat_") V1(a, b, c)
2651 processed, and not yet closed, we need to store tag->rawName in a more
2662 /* Stop if already stored. Since m_tagStack is a stack, we can stop
2664 below it in the stack is already been accounted for in a
2670 size of tag->buf is a multiple of sizeof(XML_Char).
2939 /* First, determine if a check for an existing declaration is needed;
3187 /* BEGIN disabled code */
3188 /* Suppose you doing a transformation on a document that involves
3189 changing only the character data. You set up a defaultHandler
3190 and a characterDataHandler. The defaultHandler simply copies
3197 However, now we have a start/endCdataSectionHandler, so it seems
3203 /* END disabled code */
3279 * However it is a useful safety net, so we retain the code and
3456 namespace are used. For this case we have a check further down.
3570 /* hash table size must also be a power of 2 and >= 8 */
3607 /* using a version flag saves us from initializing m_nsAtts every time */
3631 /* This code is walking through the appAtts array, dealing
3632 * with (in this case) a prefixed attribute name. To be in
3636 * exists, so the lookup above will return a pointer to
3643 * remove the code from coverage tests.
3672 Derived from code in lookup(parser, HASH_TABLE *table, ...).
3793 /* we always have a namespace separator between localPart and prefix */
3838 case 'a':
3978 // in its element handler code) cannot be confused by an attacker
3983 // advising against use of a namespace separator character that can
3984 // appear in a URI for >20 years now, some widespread applications
3985 // are using URI characters (':' (colon) in particular) for a
3989 // is a non-URI character with regard to RFC 3986.
4074 /* if attId == NULL then we are not starting a namespace scope */
4141 /* BEGIN disabled code */
4146 /* END disabled code */
4203 * We retain it as a safety net and exclude it from the coverage
4263 * of code cannot be executed. The only occasions on which 'enc'
4268 * Since it really isn't clear that this is true, we keep the code
4317 * executed. We keep it as a safety net anyway, and remove it
4420 * of bytes in the smallest representation of a character? If
4559 * that to happen, a parameter entity parsing handler must have attempted
4590 /* If we get this token, we have the start of what might be a
4591 normal tag, but not a declaration (i.e. it doesn't begin with
4592 "<!"). In a DTD context, that isn't legal.
4628 However, when parsing an external subset, doProlog will not accept a BOM
4629 as valid, and report a syntax error, so we have to skip the BOM, and
4907 /* parser->m_doctypeSysid will be non-NULL in the case of a previous
5091 /* ID attributes aren't allowed to have a default */
5283 /* if we have a parent parser or are reading an internal parameter
5313 /* if we have a parent parser or are reading an internal parameter
5501 /* first, determine if a check for an existing declaration is needed;
5511 /* It's hard to exhaustively search the code to be sure,
5512 * but there doesn't seem to be a way of executing the
5519 * given as a parameter entity name in XML syntax, so the
5524 * possible to create entities taking this code path that
5527 * Because this analysis is very uncertain, the code is
5863 /* Set a safe default value in case 'next' does not get set */
5910 /* Set a safe default value in case 'next' does not get set */
6040 * error return happens if the code point passed in is either
6042 * XmlCharRefNumber() functions will all return a number
6043 * strictly less than 0x110000 or a negative value if an error
6045 * XmlEncode() is never passed a value it might return an
6093 /* First, determine if a check for an existing declaration is needed;
6129 * entity, it must have gone through this code before and
6135 * It doesn't appear there is another code path that gets
6180 * names before XmlAttributeValueTok() gets a look-in. This
6181 * default case should be retained as a safety net, but the code
6246 /* not a well-formedness error - see XML 1.0: WFC Entity Declared */
6332 * error return happens if the code point passed in is either
6334 * XmlCharRefNumber() functions will all return a number
6335 * strictly less than 0x110000 or a negative value if an error
6337 * XmlEncode() is never passed a value it might return an
6487 * using a character encoding that is not the same as the
6492 * the internal encoding (e.g. a previously defined parameter
6528 a default which duplicates a non-default. */
6695 * This is part of a loop copying the default prefix binding
6697 * that URI was copied into the same string pool, with a
6699 * the pool was cleared, that leaves a block definitely big
6705 * getContext() calls, the worst it can do is leave a bigger
6727 * not seem to be a way of injecting a prefix without a binding
6956 /* Do a deep copy of the DTD. Return 0 for out of memory, non-zero otherwise.
7201 /* table->size is a power of 2 */
7403 * place to copy the text of a simple general entity. By that
7450 ** For a + b * c we check b * c in isolation first, so that addition of a
7451 ** on top has no chance of making us accept a small non-negative number
7507 /* This condition traps a situation where either more than
7535 /* This condition traps a situation where either more than
7649 * array of CONTENT_SCAFFOLD tree nodes into a new array of
7650 * XML_Content tree nodes followed by a gapless list of zero-terminated
7681 * recursively in a dedicated function called "build_node". The old recursive
7682 * build_node could be forced into stack exhaustion from input as small as a
7683 * few megabyte, and so that was a security issue. Hence, a function call
7698 * "numchildren" field (which actually holds a source node array index
7706 * them as new jobs, in order. As a result, tree node siblings are
7822 const size_t lenOfShortestInclude = sizeof("<!ENTITY a SYSTEM 'b'>") - 1;
8228 return "a";
8547 return "dead code";