cURL / Mailing Lists / curl-library / Single Mail

curl-library

Fw: Bug#185254: libcurl2: Multiple uploads per handle fail

From: Domenico Andreoli <cavok_at_filibusta.crema.unimi.it>
Date: Fri, 21 Mar 2003 15:03:09 +0100

hi all,

this guy seems to have solved a issue. i don't know if it
has been already managed. full bug report is available at
http://bugs.debian.org/185254 .

cheers
cavok

----- Forwarded message from Tim Pope <tpope_at_sexygeek.org> -----

Date: Tue, 18 Mar 2003 00:04:57 -0600
From: Tim Pope <tpope_at_sexygeek.org>
To: Debian Bug Tracking System <submit_at_bugs.debian.org>
Reply-To: Tim Pope <tpope_at_sexygeek.org>, 185254_at_bugs.debian.org
Subject: Bug#185254: libcurl2: Multiple uploads per handle fail

Package: libcurl2
Version: 7.10.3-3
Severity: normal
Tags: patch

After one transfers a file using a curl handle, subsequent attempts to
change the uploaded file handle (CURLOPT_INFILE) are lost. If the
previous file handle no longer exists, the calling application
typically segfaults (see #167944).

The following patch appears to fix the problem.

diff -urN curl-7.10.3/lib/url.c curl/lib/url.c
--- curl-7.10.3/lib/url.c 2003-01-10 10:19:32.000000000 -0600
+++ curl/lib/url.c 2003-03-17 22:40:00.000000000 -0600
@@ -1803,9 +1803,6 @@
   /* else, no chunky upload */
   FALSE;
 
- conn->fread = data->set.fread;
- conn->fread_in = data->set.in;
-
   /***********************************************************
    * We need to allocate memory to store the path in. We get the size of the
    * full URL to be sure, and we need to make it at least 256 bytes since
@@ -2650,6 +2647,9 @@
     ConnectionStore(data, conn);
   }
 
+ conn->fread = data->set.fread;
+ conn->fread_in = data->set.in;
+
   /*************************************************************
    * Set timeout if that is being used
    *************************************************************/

-- System Information
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux marge 2.4.20 #1 Sat Mar 15 17:03:22 CST 2003 i686
Locale: LANG=C, LC_CTYPE=C

Versions of packages libcurl2 depends on:
ii libc6 2.3.1-14 GNU C Library: Shared libraries an
ii libssl0.9.6 0.9.6g-6 SSL shared libraries
ii zlib1g 1:1.1.4-6 compression library - runtime

----- End forwarded message -----

-----[ Domenico Andreoli, aka cavok
 --[ http://filibusta.crema.unimi.it/~cavok/gpgkey.asc
   ---[ 3A0F 2F80 F79C 678A 8936 4FEE 0677 9033 A20E BC50

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2003-03-21