xmllint crashed with SIGSEGV in ____strtol_l_internal()

Bug #923671 reported by Tais P. Hansen
26
This bug affects 3 people
Affects Status Importance Assigned to Milestone
libxml2
Fix Released
Medium
libxml2 (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Running "xmllint --pretty" with/without input crashes. Possibly a cmdline parameter parse problem, as --pretty should take a numeric argument.

ProblemType: Crash
DistroRelease: Ubuntu 11.10
Package: libxml2-utils 2.7.8.dfsg-4ubuntu0.1
ProcVersionSignature: Ubuntu 3.0.0-15.26-generic 3.0.13
Uname: Linux 3.0.0-15-generic x86_64
ApportVersion: 1.23-0ubuntu4
Architecture: amd64
Date: Mon Jan 30 11:31:08 2012
ExecutablePath: /usr/bin/xmllint
InstallationMedia: Kubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427)
ProcCmdline: xmllint --pretty
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=en_US.UTF-8
 LANGUAGE=en_US:en
SegvAnalysis:
 Segfault happened at: 0x7fe5a5f809f4 <____strtol_l_internal+68>: movzbl (%rbx),%eax
 PC (0x7fe5a5f809f4) ok
 source "(%rbx)" (0x00000000) not located in a known VMA region (needed readable region)!
 destination "%eax" ok
SegvReason: reading NULL VMA
Signal: 11
SourcePackage: libxml2
StacktraceTop:
 ____strtol_l_internal (nptr=0x0, endptr=0x0, base=10, group=<optimized out>, loc=0x7fe5a62dc6a0) at ../stdlib/strtol_l.c:298
 atoi (__nptr=<optimized out>) at /usr/include/stdlib.h:286
 main (argc=2, argv=0x7fff7f294e38) at ../../xmllint.c:3351
Title: xmllint crashed with SIGSEGV in ____strtol_l_internal()
UpgradeStatus: Upgraded to oneiric on 2011-10-14 (107 days ago)
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Revision history for this message
Tais P. Hansen (taisph) wrote :
description: updated
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 ____strtol_l_internal (nptr=0x0, endptr=0x0, base=10, group=<optimized out>, loc=0x7fe5a62dc6a0) at ../stdlib/strtol_l.c:298
 atoi (__nptr=<optimized out>) at /usr/include/stdlib.h:286
 main (argc=2, argv=0x7fff7f294e38) at ../../xmllint.c:3351

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in libxml2 (Ubuntu):
importance: Undecided → Medium
tags: removed: need-amd64-retrace
visibility: private → public
Changed in libxml2:
importance: Unknown → Medium
status: Unknown → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in libxml2 (Ubuntu):
status: New → Confirmed
Revision history for this message
Chris West (faux) wrote :

        else if ((!strcmp(argv[i], "-pretty")) ||
                 (!strcmp(argv[i], "--pretty"))) {
             i++;
#ifdef LIBXML_OUTPUT_ENABLED
             format = atoi(argv[i]);

i > argc. Boom!

tags: added: precise
Revision history for this message
Tim Galeckas (tim-n) wrote :

I have included a patch.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Check for NULL into atoi" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Changed in libxml2:
status: New → Fix Released
Aron Xu (happyaron)
Changed in libxml2 (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.