escputil crashed with SIGSEGV in ____strtoll_l_internal()

Bug #263748 reported by Daniel J Blueman
30
Affects Status Importance Assigned to Milestone
gutenprint (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

When running escputil like below, it gets hit with SIGSEGV:

$ escputil --choices --raw-device /dev/usb/lp0
Segmentation fault (core dumped)

Alas, I can't find the dbg package to install, but the problem is confirmed with valgrind:

$ valgrind escputil --choices --raw-device /dev/usb/lp0
==21260== Memcheck, a memory error detector.
==21260== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==21260== Using LibVEX rev 1854, a library for dynamic binary translation.
==21260== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==21260== Using valgrind-3.3.1-Debian, a dynamic binary instrumentation framework.
==21260== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==21260== For more details, rerun with: -v
==21260==
==21260== Invalid read of size 1
==21260== at 0x59B0ABA: ____strtol_l_internal (strtol_l.c:298)
==21260== by 0x410FA2: (within /usr/bin/escputil)
==21260== by 0x5997465: (below main) (libc-start.c:220)
==21260== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==21260==
==21260== Process terminating with default action of signal 11 (SIGSEGV)
==21260== Access not within mapped region at address 0x0
==21260== at 0x59B0ABA: ____strtol_l_internal (strtol_l.c:298)
==21260== by 0x410FA2: (within /usr/bin/escputil)
==21260== by 0x5997465: (below main) (libc-start.c:220)
==21260==
==21260== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 8 from 1)
==21260== malloc/free: in use at exit: 2,159,815 bytes in 33,867 blocks.
==21260== malloc/free: 105,945 allocs, 72,078 frees, 6,440,297 bytes allocated.
==21260== For counts of detected errors, rerun with: -v
==21260== searching for pointers to 33,867 not-freed blocks.
==21260== checked 2,065,816 bytes.
==21260==
==21260== LEAK SUMMARY:
==21260== definitely lost: 964 bytes in 33 blocks.
==21260== possibly lost: 0 bytes in 0 blocks.
==21260== still reachable: 2,158,851 bytes in 33,834 blocks.
==21260== suppressed: 0 bytes in 0 blocks.
==21260== Rerun with --leak-check=full to see details of leaked memory.
Segmentation fault (core dumped)

ProblemType: Crash
Architecture: amd64
DistroRelease: Ubuntu 8.10
ExecutablePath: /usr/bin/escputil
Package: escputil 5.2.0~beta4-0ubuntu1
ProcAttrCurrent: unconfined
ProcCmdline: escputil --choices --raw-device /dev/usb/lp0
ProcEnviron:
 SHELL=/bin/bash
 PATH=/store/users/daniel/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 LANG=en_GB.UTF-8
Signal: 11
SourcePackage: gutenprint
StacktraceTop:
 ____strtoll_l_internal () from /lib/libc.so.6
 ?? ()
 __libc_start_main () from /lib/libc.so.6
 ?? ()
 ?? ()
Title: escputil crashed with SIGSEGV in ____strtoll_l_internal()
Uname: Linux 2.6.27-2-generic x86_64
UserGroups: adm admin audio cdrom dialout dip floppy kvm lpadmin mythtv plugdev scanner video

Revision history for this message
Daniel J Blueman (danielblueman) wrote :
Revision history for this message
Apport retracing service (apport) wrote : Symbolic stack trace

StacktraceTop:____strtoll_l_internal () from /lib/libc.so.6
?? ()
__libc_start_main () from /lib/libc.so.6
?? ()
?? ()

Revision history for this message
Apport retracing service (apport) wrote : Symbolic threaded stack trace
Revision history for this message
Ralph Corderoy (ralph-inputplus) wrote :

Ubuntu 8.04, escputil 5.0.2-2ubuntu1. Option -C and -p require an
argument, and complain correctly when one is missing. The long
versions, --choices and --patterns, are incorrectly defined as having no
argument so getopt_long() doesn't indicate there's a problem and the
shared code for -C/--choices attempts to handle the missing argument.

src/escputil/escputil.c has

      { "short-name", 0, NULL, (int) 'S' },
      { "choices", 0, NULL, (int) 'C' },
      { "patterns", 0, NULL, (int) 'p' },
      { NULL, 0, NULL, 0 }
    };

The `0' for "choices" and "patterns" should be 1.

Changed in gutenprint:
status: New → Confirmed
Revision history for this message
dino99 (9d9) wrote :

That version has died long ago; no more supported

Changed in gutenprint (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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