~ubuntu-branches/ubuntu/wily/libxml2/wily-proposed

« back to all changes in this revision

Viewing changes to parser.c

  • Committer: Package Import Robot
  • Author(s): Aron Xu, Daniel Veillard
  • Date: 2012-11-28 22:34:15 UTC
  • mfrom: (43.1.15 experimental)
  • Revision ID: package-import@ubuntu.com-20121128223415-gxdojzs7tsfu4j3r
Tags: 2.9.0+dfsg1-4
[ Daniel Veillard ]
Fix potential out of bound access
CVE-2012-5134, Closes: #694521.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4075
4075
        goto error;
4076
4076
 
4077
4077
    if ((in_space) && (normalize)) {
4078
 
        while (buf[len - 1] == 0x20) len--;
 
4078
        while ((len > 0) && (buf[len - 1] == 0x20)) len--;
4079
4079
    }
4080
4080
    buf[len] = 0;
4081
4081
    if (RAW == '<') {