| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
To detect EBCDIC code pages, we used to switch the encoding twice and
had to be very careful not to decode data after the XML declaration
before the second switch. This relied on a hard-coded expected size of
the XML declaration and was complicated and unreliable.
Now we convert the first 200 bytes to EBCDIC-US and parse the encoding
declaration manually.
|
|
|
|
|
|
|
|
|
|
| |
Don't try to grow the input buffer in xmlParserShrink. This makes sure
that no memory allocations are made and the function always succeeds.
Remove unnecessary invocations of SHRINK. Invoke SHRINK at the end of
DTD parsing loops.
Shrink before growing.
|
|
|
|
|
| |
Fix 3eb6bf03. We really have to halt the parser, so the input buffer
gets reset.
|
|
|
|
|
| |
Introduce xmlParserShrink which takes a parser context to simplify error
handling.
|
|
|
|
|
| |
Introduce xmlParserGrow which takes a parser context to simplify error
handling.
|
| |
|
|
|
|
|
|
|
| |
- Add private/xinclude.h to EXTRA_DIST
- Add runsuite.log to CLEANFILES
Fixes #485.
|
|
|
|
|
| |
Set a flag to detect entity loops at once instead of processing until
the depth limit is exceeded.
|
| |
|
|
|
|
|
|
|
|
| |
Instead of abusing the LSB of the "checked" member, store the result
of testing for occurrence of '<' character in "flags".
Also use the flags in xmlParseStringEntityRef instead of rescanning
every time.
|
|
|
|
|
|
|
|
| |
To check whether an entity was already parsed, the code previously
tested whether "checked" was non-zero or "children" was non-null. The
"children" check could be unreliable because an empty entity also
results in an empty (NULL) node list. Use a separate flag to make this
check more reliable.
|
|
|
|
|
|
|
| |
These functions were never declared in public headers, so it should be
safe to hide them.
Fixes #139.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Make init/cleanup functions private. Merge xmlOnceInit into
xmlInitThreadsInternal.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
In some cases, for example when using encoders, the read callback was
set to NULL, in other cases it was set to xmlInputReadCallbackNop.
xmlGROW only tested for xmlInputReadCallbackNop, resulting in errors
when parsing large encoded content from memory.
Always use a NULL callback for memory buffers to avoid ambiguities.
Fixes #262.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using xmlreader, XPointer expressions in XIncludes simply cannot
work. Expressions can reference nodes which weren't parsed yet or which
were already deleted.
After fixing nested XIncludes, we reference includes which were parsed
previously. When streaming, these nodes could have been deleted, leading
to use-after-free errors.
Disallow XPointer expressions and truncate the include table in
streaming mode.
|
|
|
|
|
|
|
| |
Avoid call stack overflows.
Also switch to xmlStaticCopyNode which avoids duplicate namespace
definitions.
|
|
Private functions were previously declared
- in header files in the root directory
- in public headers guarded with IN_LIBXML
- in libxml.h
- redundantly in source files that used them.
Consolidate all private header files in include/private.
|