Silent failure if ampersand is not closed out with a semicolon for entity
drbitboy opened this issue · 3 comments
drbitboy commented
Describe the bug
Partial parse of incomplete entity (ampersand without closing semicolon) returning indication of neither completion nor error.
To Reproduce
- ###from top directory of repo:
- cd libs/indicore/
- ###fix errors and warnings in test code:
- sed -i -e '/str = malloc/s/malloc/(char*) &/' -e '/%d",.*sprXMLEle/s/d",/l&/' lilxml.cpp
- g++ -DMAIN_TST -o ./lilxml lilxml.cpp
- echo '<root value="&xxx">321</root>' | ./lilxml
- no output
- echo '<root>x &</root>' | ./lilxml
- no output
Expected behavior
- EITHER generate an error because the sequences &xxx< and &xxx" are invalid entities,
- OR accept &xxx as a non-entity string
Screenshots
Not necessary; see To Reproduce above
Desktop:
- OS: WSL/Ubuntu (but should be consistent across several environments)
$ git --version
git version 2.25.1
$ uname -a
Linux DESKTOP-1OLDNFS 5.10.102.1-microsoft-standard-WSL2 #1 SMP Wed Mar 2 00:30:59 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
$ more /etc/*release*
::::::::::::::
/etc/lsb-release
::::::::::::::
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.6 LTS"
::::::::::::::
/etc/os-release
::::::::::::::
NAME="Ubuntu"
VERSION="20.04.6 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.6 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
- Version [e.g. 1.7.6, GIT..etc]
Log Files
N/A