mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
- Balint Szilakszi reported a memory leak when libcurl did gzip decompression
of streams that had some parts (legitimately) missing. We now provide and use a proper cleanup function for the content encoding submodule. http://curl.haxx.se/mail/lib-2009-05/0092.html
This commit is contained in:
parent
6e1632c606
commit
242a17b9e0
5
CHANGES
5
CHANGES
@ -7,6 +7,11 @@
|
|||||||
Changelog
|
Changelog
|
||||||
|
|
||||||
Daniel Stenberg (11 May 2009)
|
Daniel Stenberg (11 May 2009)
|
||||||
|
- Balint Szilakszi reported a memory leak when libcurl did gzip decompression
|
||||||
|
of streams that had some parts (legitimately) missing. We now provide and use
|
||||||
|
a proper cleanup function for the content encoding submodule.
|
||||||
|
http://curl.haxx.se/mail/lib-2009-05/0092.html
|
||||||
|
|
||||||
- Kamil Dudka provided a fix for libcurl-NSS reported by Michael Cronenworth
|
- Kamil Dudka provided a fix for libcurl-NSS reported by Michael Cronenworth
|
||||||
at https://bugzilla.redhat.com/show_bug.cgi?id=453612#c12
|
at https://bugzilla.redhat.com/show_bug.cgi?id=453612#c12
|
||||||
|
|
||||||
|
@ -46,6 +46,7 @@ This release includes the following bugfixes:
|
|||||||
o fixed the Curl_getoff_all_pipelines SIGSEGV
|
o fixed the Curl_getoff_all_pipelines SIGSEGV
|
||||||
o POST, NTLM and following a redirect hang
|
o POST, NTLM and following a redirect hang
|
||||||
o libcurl+NSS endless loop on incorrect password for private key
|
o libcurl+NSS endless loop on incorrect password for private key
|
||||||
|
o gzip decompression memory leak
|
||||||
|
|
||||||
This release includes the following known bugs:
|
This release includes the following known bugs:
|
||||||
|
|
||||||
@ -59,6 +60,7 @@ advice from friends like these:
|
|||||||
Kamil Dudka, Jim Freeman, Daniel Johnson, Toshio Kuratomi, Martin Storsjo,
|
Kamil Dudka, Jim Freeman, Daniel Johnson, Toshio Kuratomi, Martin Storsjo,
|
||||||
Pramod Sharma, Gisle Vanem, Lenaic Lefever, Rainer Koenig, Sven Wegener,
|
Pramod Sharma, Gisle Vanem, Lenaic Lefever, Rainer Koenig, Sven Wegener,
|
||||||
Tim Chen, Constantine Sapuntzakis, David McCreedy, Michael Smith,
|
Tim Chen, Constantine Sapuntzakis, David McCreedy, Michael Smith,
|
||||||
Colin Watson, Ebenezer Ikonne, Laurent Rabret, Michael Cronenworth
|
Colin Watson, Ebenezer Ikonne, Laurent Rabret, Michael Cronenworth,
|
||||||
|
Balint Szilakszi
|
||||||
|
|
||||||
Thanks! (and sorry if I forgot to mention someone)
|
Thanks! (and sorry if I forgot to mention someone)
|
||||||
|
@ -9,10 +9,12 @@ To be addressed in 7.19.5 (planned release: May 2009)
|
|||||||
- awaiting patch rework/breakdown
|
- awaiting patch rework/breakdown
|
||||||
|
|
||||||
235 - #2784055, connect race with multi and socks proxy
|
235 - #2784055, connect race with multi and socks proxy
|
||||||
|
Code adjustment for FTP over socks proxy remains
|
||||||
|
|
||||||
236 - timeout in milliseconds doesn't seem to work
|
236 - timeout in milliseconds doesn't seem to work
|
||||||
|
http://curl.haxx.se/mail/lib-2009-05/0021.html
|
||||||
|
|
||||||
239 -
|
240 -
|
||||||
|
|
||||||
To be addressed in 7.19.6 (planned release: July 2009)
|
To be addressed in 7.19.6 (planned release: July 2009)
|
||||||
=========================
|
=========================
|
||||||
|
@ -414,4 +414,14 @@ Curl_unencode_gzip_write(struct connectdata *conn,
|
|||||||
return inflate_stream(conn, k);
|
return inflate_stream(conn, k);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Curl_unencode_cleanup(struct connectdata *conn)
|
||||||
|
{
|
||||||
|
struct SessionHandle *data = conn->data;
|
||||||
|
struct SingleRequest *k = &data->req;
|
||||||
|
z_stream *z = &k->z;
|
||||||
|
if(k->zlib_init != ZLIB_UNINIT)
|
||||||
|
(void) exit_zlib(z, &k->zlib_init, CURLE_OK);
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* HAVE_LIBZ */
|
#endif /* HAVE_LIBZ */
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@ -29,8 +29,11 @@
|
|||||||
*/
|
*/
|
||||||
#ifdef HAVE_LIBZ
|
#ifdef HAVE_LIBZ
|
||||||
#define ALL_CONTENT_ENCODINGS "deflate, gzip"
|
#define ALL_CONTENT_ENCODINGS "deflate, gzip"
|
||||||
|
/* force a cleanup */
|
||||||
|
void Curl_unencode_cleanup(struct connectdata *conn);
|
||||||
#else
|
#else
|
||||||
#define ALL_CONTENT_ENCODINGS "identity"
|
#define ALL_CONTENT_ENCODINGS "identity"
|
||||||
|
#define Curl_unencode_cleanup(x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CURLcode Curl_unencode_deflate_write(struct connectdata *conn,
|
CURLcode Curl_unencode_deflate_write(struct connectdata *conn,
|
||||||
@ -42,4 +45,5 @@ Curl_unencode_gzip_write(struct connectdata *conn,
|
|||||||
struct SingleRequest *k,
|
struct SingleRequest *k,
|
||||||
ssize_t nread);
|
ssize_t nread);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -97,6 +97,7 @@
|
|||||||
#include "strtoofft.h"
|
#include "strtoofft.h"
|
||||||
#include "multiif.h"
|
#include "multiif.h"
|
||||||
#include "rawstr.h"
|
#include "rawstr.h"
|
||||||
|
#include "content_encoding.h"
|
||||||
|
|
||||||
#define _MPRINTF_REPLACE /* use our functions only */
|
#define _MPRINTF_REPLACE /* use our functions only */
|
||||||
#include <curl/mprintf.h>
|
#include <curl/mprintf.h>
|
||||||
@ -1917,6 +1918,8 @@ CURLcode Curl_http_done(struct connectdata *conn,
|
|||||||
struct HTTP *http =data->state.proto.http;
|
struct HTTP *http =data->state.proto.http;
|
||||||
(void)premature; /* not used */
|
(void)premature; /* not used */
|
||||||
|
|
||||||
|
Curl_unencode_cleanup(conn);
|
||||||
|
|
||||||
/* set the proper values (possibly modified on POST) */
|
/* set the proper values (possibly modified on POST) */
|
||||||
conn->fread_func = data->set.fread_func; /* restore */
|
conn->fread_func = data->set.fread_func; /* restore */
|
||||||
conn->fread_in = data->set.in; /* restore */
|
conn->fread_in = data->set.in; /* restore */
|
||||||
|
Loading…
Reference in New Issue
Block a user