Question Details

No question body available.

Tags

c++ xml libxml2 dtd dtd-parsing

Answers (1)

Accepted Answer Available
Accepted Answer
April 4, 2026 Score: 2 Rep: 38,467 Quality: High Completeness: 70%

From a bit of debugging it looks like this is the fix https://gitlab.gnome.org/GNOME/libxml2/-/commit/4951c462eae68562df335ff6d611f4352ea9931d#line25394ee03367, no mention of this particular bug in the release notes though so I'm not sure if there's a workaround.

Basically the parser attempts to shrink the buffer but gets its sums wrong and ends up moving the read pointer from the closing bracket in to the D in label CDATA #IMPLIED, it then tries to find the closing ) it's expecting and fails when it doesn't find one.

The simplest fix is to upgrade to version 2.10.0 or later, unfortunately this isn't available from the Ubuntu 24.04 repositories, you'll need to get it from somewhere else.