Public bug reported:

Binary package hint: apt-cacher-ng

It kept crashing when I tried to use it. I've created a patch and will
attach it. The problem was that when the content encoding is 'chunked',
the content length can be NULL or zero... but there was no guard against
this condition and atoll was being handed a NULL, causing a segv.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fc933d2c710 (LWP 19360)]
____strtol_l_internal (nptr=0x0, endptr=0x0, base=10, group=0, 
loc=0x7fc9348a6580) at ../stdlib/strtol_l.c:298
298     ../stdlib/strtol_l.c: No such file or directory.
        in ../stdlib/strtol_l.c
Current language:  auto
The current source language is "auto; currently c".
(gdb) where full
#0  ____strtol_l_internal (nptr=0x0, endptr=0x0, base=10, group=0, 
loc=0x7fc9348a6580) at ../stdlib/strtol_l.c:298
        negative = 0
        cutoff = <value optimized out>
        cutlim = 0
        i = <value optimized out>
        s = <value optimized out>
        c = <value optimized out>
        save = <value optimized out>
        end = <value optimized out>
        overflow = <value optimized out>
        cnt = <value optimized out>
        current = 0x7fc9348a4720
        thousands = 0x0
        thousands_len = <value optimized out>
        grouping = 0x0
#1  0x0000000000430357 in fileitem::DownloadStartedStoreHeader 
(this=0x7fc92c00ed60, h=...) at source/fileitem.cc:236
        hint_start = 0
        __lockguard = {l = 0x7fc92c00ed68, bLocked = true}
        hint_length = 0
        code = 200
        bStoreData = true
        sHeadPath = {static npos = 18446744073709551615, 
          _M_dataplus = {<std::allocator<char>> = 
{<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, 
            _M_p = 0x891888 
"/var/cache/apt-cacher-ng/uburep/dists/karmic-updates/Release.head"}}
#2  0x000000000041e7f4 in tDlJob::ProcessIncomming (this=0x7fc92c00e5e0, 
inBuf=..., sErrorRet=...) at source/dljob.cc:299
        h = {type = header::ANSWER, frontLine = {static npos = 
18446744073709551615, 
            _M_dataplus = {<std::allocator<char>> = 
{<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p 
= 0x881888 "HTTP/1.1 200 OK"}}, 
          m_nEstimLength = 293, h = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x881770 
"Fri, 19 Feb 2010 08:25:10 GMT", 0x0, 0x880590 "chunked", 
            0x8a71e0 
"http://ubuntu.cs.utah.edu/ubuntu/dists/karmic-updates/Release";, 0x0, 0x0, 0x0}}
        l = 293
        p = 0x880590 "chunked"

ProblemType: Bug
Architecture: amd64
Date: Sat Feb 20 23:37:52 2010
DistroRelease: Ubuntu 10.04
Package: apt-cacher-ng 0.4.3-1
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/zsh
ProcVersionSignature: Ubuntu 2.6.32-14.19-generic
SourcePackage: apt-cacher-ng
Uname: Linux 2.6.32-14-generic x86_64

** Affects: apt-cacher-ng (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug lucid

-- 
segmentation fault in fileitem.cc
https://bugs.launchpad.net/bugs/525176
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to