[xml/sgml-pkgs] Bug#530998: libxml2-utils: unhelpful error parsing infinitely recursive parameter entity

Drake Wilson drake at begriffli.ch
Fri May 29 05:35:59 UTC 2009


Package: libxml2-utils
Version: 2.7.3.dfsg-1
Severity: minor

Context: a file named loop.xml containing the following text (sans
initial vertical bar and space):
| <!DOCTYPE x [
| <!ELEMENT x ANY>
| <!ENTITY % x "&#37;x;">
| %x;
| ]>
| <x/>

Running [xmllint loop.xml] produces the following output:
| Entity: line 1: parser error : internal error
|  %x; 
|     ^
| Entity: line 1: 
| %x;
| ^
| Entity: line 1: parser error : DOCTYPE improperly terminated
|  %x; 
|     ^
| Entity: line 1: 
| %x;
| ^
| Entity: line 1: parser error : Start tag expected, '<' not found
|  %x; 
|     ^
| Entity: line 1: 
| %x;
|  ^

The XML is obviously bogus, but the error messages could be improved:
ideally it would result in a graceful detection rather than an
"internal error".

   ---> Drake Wilson

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.29-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages libxml2-utils depends on:
ii  libc6                       2.9-13       GNU C Library: Shared libraries
ii  libreadline5                5.2-4        GNU readline and history libraries
ii  libxml2                     2.7.3.dfsg-1 GNOME XML library

libxml2-utils recommends no packages.

libxml2-utils suggests no packages.

-- no debconf information





More information about the debian-xml-sgml-pkgs mailing list