Skip to content
  • 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.
    5f440d8c