cURL / Mailing Lists / curl-library / Single Mail

curl-library

Segfault downloading two files with "-O -J"

From: Paul Howarth <paul_at_city-fan.org>
Date: Thu, 21 Jul 2011 11:27:08 +0100

This is from http://bugzilla.redhat.com/723075

curl segfaults when running this:

curl -O -J \
'http://koji.fedoraproject.org/koji/getfile?taskID=3208065&name=python26-boto-2.0-1.el5.noarch.rpm'
\
'http://koji.fedoraproject.org/koji/getfile?taskID=3208065&name=python26-boto-2.0-1.el5.src.rpm'

It downloads the first file and then crashes before starting the second one.

Original reporter posted this backtrace from gdb:

Program received signal SIGSEGV, Segmentation fault.
0x0000000000405d74 in header_callback (ptr=<value optimized out>,
size=<value
optimized out>,
     nmemb=<value optimized out>, stream=0x0) at main.c:4389
4389 outs->filename = filename;
(gdb) bt
#0 0x0000000000405d74 in header_callback (ptr=<value optimized out>,
size=<value optimized out>,
     nmemb=<value optimized out>, stream=0x0) at main.c:4389
#1 0x000000343761a3b9 in Curl_client_write (conn=<value optimized out>,
type=<value optimized out>,
     ptr=0x62c120 "Content-Disposition: attachment;
filename=python26-boto-2.0-1.el5.src.rpm\r\n", len=75)
     at sendf.c:487
#2 0x0000003437618f2f in Curl_http_readwrite_headers (data=0x623560,
conn=0x62ddd0, nread=0x7fffffffd6d0,
     stop_reading=0x7fffffffd6de) at http.c:3779
#3 0x000000343762c632 in readwrite_data (conn=0x62ddd0,
done=0x7fffffffd78e)
at transfer.c:455
#4 Curl_readwrite (conn=0x62ddd0, done=0x7fffffffd78e) at transfer.c:1004
#5 0x000000343762dd47 in Transfer (data=0x623560) at transfer.c:1367
#6 Curl_do_perform (data=0x623560) at transfer.c:2053
#7 0x000000000040890c in operate (argc=0, argv=<value optimized out>) at
main.c:5358
#8 main (argc=0, argv=<value optimized out>) at main.c:5683

The original reporter was using curl 7.21.0 on Fedora 14 but I have
reproduced the crash with curl 7.21.7 on Fedora 15.

Paul.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-07-21