1. 28 Aug, 2017 1 commit
    • Stéphane Michaut's avatar
      Porting libxml2 on zOS encoding of code · 454e397e
      Stéphane Michaut authored
      First set of patches for zOS
      - entities.c parser.c tree.c xmlschemas.c xmlschemastypes.c xpath.c xpointer.c:
        ask conversion of code to ISO Latin 1 to avoid having the compiler assume
        EBCDIC codepoint for characters.
      - xmlmodule.c: make sure we have support for modules
      - xmlIO.c: zOS path names are special avoid dsome of the expectstions from
  2. 21 Aug, 2017 1 commit
  3. 27 Jul, 2017 2 commits
    • Daniel Veillard's avatar
      Fix signature of xmlSchemaAugmentImportedIDC · 27f310d4
      Daniel Veillard authored
      this is used in a callback which will pass a name, the name is ignored
      but it's best to have the signature of the function match, pointed out
      by Claude Petit
      * xmlschemas.c: fix xmlSchemaAugmentImportedIDC() signature no functional
    • Patrick Monnerat's avatar
      small changes for OS/400 · d1f90624
      Patrick Monnerat authored
      OS/400 version V5R3 is not supported by IBM anymore.
      In addition, the iSeries system I have here for development has been changed
      and the new system is not able to compile for an OS version lower than V6R1.
      Thus I made some updates to the libxml2 os400 scripts accordingly:
      - Oldest supported OS version is now V6R1.
      - Adjust ILE/RPG wrappers comments.
      - Update copyright year range.
      - Do not log compiler informational messages.
  4. 25 Jul, 2017 1 commit
  5. 04 Jul, 2017 4 commits
  6. 20 Jun, 2017 6 commits
    • Nick Wellnhofer's avatar
      Fix NULL deref in xmlParseExternalEntityPrivate · 3eef3f39
      Nick Wellnhofer authored
      If called from xmlParseExternalEntity, oldctxt is NULL which leads to
      a NULL deref if an error occurs. This only affects external code that
      calls xmlParseExternalEntity.
      Patch from David Kilzer with minor changes.
      Fixes bug 780159.
    • Nick Wellnhofer's avatar
      Get rid of "blanks wrapper" for parameter entities · 872fea94
      Nick Wellnhofer authored
      Now that replacement of parameter entities goes exclusively through
      xmlSkipBlankChars, we can account for the surrounding space characters
      there and remove the "blanks wrapper" hack.
    • Nick Wellnhofer's avatar
      Make sure not to call IS_BLANK_CH when parsing the DTD · d9e43c7d
      Nick Wellnhofer authored
      This is required to get rid of the "blanks wrapper" hack. Checking the
      return value of xmlSkipBlankChars is more efficient, too.
    • Nick Wellnhofer's avatar
      Remove unnecessary calls to xmlPopInput · 453dff1e
      Nick Wellnhofer authored
      It's enough if xmlPopInput is called from xmlSkipBlankChars. Since the
      replacement text of a parameter entity is surrounded with space
      characters, that's the only place where the replacement can end in a
      well-formed document.
      This is also required to get rid of the "blanks wrapper" hack.
    • Nick Wellnhofer's avatar
      Simplify handling of parameter entity references · aa267cd1
      Nick Wellnhofer authored
      There are only two places where parameter entity references must be
      handled. For the internal subset in xmlParseInternalSubset. For the
      external subset or content from other external PEs in xmlSkipBlankChars.
      Make sure that xmlSkipBlankChars skips over sequences of PEs and
      whitespace. Rely on xmlSkipBlankChars instead of calling
      xmlParsePEReference directly when in the external subset or a
      conditional section.
      xmlParserHandlePEReference is unused now.
    • Nick Wellnhofer's avatar
      Fix xmlHaltParser · 24246c76
      Nick Wellnhofer authored
      Pop all extra input streams before resetting the input. Otherwise,
      a call to xmlPopInput could make input available again.
      Also set input->end to input->cur.
      Changes the test output for some error tests. Unfortunately, some
      fuzzed test cases were added to the test suite without manual cleanup.
      This makes it almost impossible to review the impact of later changes
      on the test output.
  7. 19 Jun, 2017 2 commits
    • Nick Wellnhofer's avatar
      Fix pathological performance when outputting charrefs · e5107772
      Nick Wellnhofer authored
      If a character can't be represented in the output encoding, it is
      converted to a character reference. This used to to replace the
      character in the input stream by calling xmlBufAddHead or
      xmlBufferAddHead. These functions shifted the entire input array
      around, leading to quadratic performance when converting a run of
      non-representable characters. This is most pronounced when dumping to
      Output the charref directly instead.
      Found with libFuzzer.
    • Nick Wellnhofer's avatar
      Deduplicate code in encoding.c · c9ccbd6a
      Nick Wellnhofer authored
      Introduce static functions xmlEncInputChunk and xmlEncOutputChunk
      that handle the internal/iconv/ICU branching.
  8. 18 Jun, 2017 1 commit
  9. 17 Jun, 2017 12 commits
    • Nick Wellnhofer's avatar
      Spelling and grammar fixes · 8bbe4508
      Nick Wellnhofer authored
      Fixes bug 743172, bug 743489, bug 769632, bug 782400 and a few other
    • Nick Wellnhofer's avatar
      Make HTML parser functions take const pointers · 576912fa
      Nick Wellnhofer authored
      The 'cur' parameter of htmlParseDoc and htmlSAXParseDoc should be
      'const xmlChar *'.
      Fixes bug 770650.
    • Nick Wellnhofer's avatar
      Build test programs only when needed · 988a5a3b
      Nick Wellnhofer authored
      Add test programs to 'check_PROGRAMS' instead of 'noinst_PROGRAMS'.
      Fixes bug 760457.
    • Nick Wellnhofer's avatar
      Fix doc/examples/index.py · b9b4b6b5
      Nick Wellnhofer authored
      In my previous commit that silenced some test output I didn't realize
      that doc/examples/Makefile.am was autogenerated.
      Also make index.py output deterministic by sorting the glob results.
    • Nick Wellnhofer's avatar
      Fix compiler warnings in threads.c · 1f09aea2
      Nick Wellnhofer authored
      Use '#pragma weak' to declare weak functions.
    • Nick Wellnhofer's avatar
      Fix empty-body warning in nanohttp.c · 629e47e7
      Nick Wellnhofer authored
    • Nick Wellnhofer's avatar
      Fix cast-align warnings · 1a595cd1
      Nick Wellnhofer authored
      - Suppress warnings in xmlmemory.c by casting to 'void *'.
      - Remove unneeded cast in xmlschemas.c that caused a macro precedence
      - Add dummy fields to short structs in xmlschemas.c. This increases the
        size of the structs, but I can't see a better solution without using
        C11's _Alignof operator.
      There are still a couple of cast-align warnings in encoding.c. These
      are legitimate portability issues that can't be fixed without reworking
      the conversion functions.
    • Nick Wellnhofer's avatar
      Fix unused-parameter warnings · 81c01ee9
      Nick Wellnhofer authored
    • Nick Wellnhofer's avatar
      Fix invalid-source-encoding warnings in testWriter.c · 1ce1f785
      Nick Wellnhofer authored
      Use hex escapes instead of binary data in source file.
    • Nick Wellnhofer's avatar
      Rework entity boundary checks · 5f440d8c
      Nick Wellnhofer authored
      Make sure to finish all entities in the internal subset. Nevertheless,
      readd a sanity check in xmlParseStartTag2 that was lost in my previous
      commit. Also add a sanity check in xmlPopInput. Popping an input
      unexpectedly was the source of many recent memory bugs. The check
      doesn't mitigate such issues but helps with diagnosis.
      Always base entity boundary checks on the input ID, not the input
      pointer. The pointer could have been reallocated to the old address.
      Always throw a well-formedness error if a boundary check fails. In a
      few places, a validity error was thrown.
      Fix a few error codes and improve indentation.
    • Nick Wellnhofer's avatar
      Don't switch encoding for internal parameter entities · 46dc9890
      Nick Wellnhofer authored
      This is only needed for external entities. Trying to switch the encoding
      for internal entities could also cause a memory leak in recovery mode.
    • Nick Wellnhofer's avatar
      Merge duplicate code paths handling PE references · 03904159
      Nick Wellnhofer authored
      xmlParsePEReference is essentially a subset of
      xmlParserHandlePEReference, so make xmlParserHandlePEReference call
      xmlParsePEReference. The code paths in these functions differed
      slighty, but the code from xmlParserHandlePEReference seems more solid
      and tested.
  10. 16 Jun, 2017 3 commits
  11. 12 Jun, 2017 4 commits
    • Nick Wellnhofer's avatar
      Treat URIs with scheme as absolute in C14N · 3939178e
      Nick Wellnhofer authored
      Fixes bug 783656.
    • Nick Wellnhofer's avatar
      Misc fixes for 'make tests' · 67f9f9d6
      Nick Wellnhofer authored
      - Silence test output.
      - Clean up after doc/examples tests.
      - Adjust expected output for script tests.
      - Add missing results for relaxng/pattern3
      There are still two test failures I can't comment on:
      - regexp/bug316338
      - schemas/any4_0
    • Nick Wellnhofer's avatar
      Initialize keepBlanks in HTML parser · 0b2d5c48
      Nick Wellnhofer authored
      This caused failures in the HTML push tests but the fix required to
      change the expected output of the HTML SAX tests.
    • David Kilzer's avatar
      Add test cases for bug 758518 · 85c112a0
      David Kilzer authored
      test/HTML/758518-entity.html exposed a bug in pushParseTest() in
      runtest.c which assumed that an input file was at least 4 bytes long.
      That test case is only 3 bytes, so we now take the minimum of 4 bytes
      or the length of the test input.  We also now use 'chunkSize' in place
      of the hard-coded value '1024' later in the function.
  12. 11 Jun, 2017 3 commits