From a19e02be5e3fc41aee1ecee73a26d363e186e36e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 13 Jan 2009 22:21:14 +0000 Subject: [PATCH] - Michael Wallner fixed a NULL pointer deref when calling curl_easy_setup(curl, CURLOPT_COOKIELIST, "SESS") on a CURL handle with no cookies data. --- CHANGES | 4 ++++ RELEASE-NOTES | 3 ++- TODO-RELEASE | 9 ++++++--- lib/cookie.c | 4 ++-- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/CHANGES b/CHANGES index a43f0f04bdb55d..b08f49030c3ca6 100644 --- a/CHANGES +++ b/CHANGES @@ -8,6 +8,10 @@ Daniel Stenberg (13 Jan 2009) +- Michael Wallner fixed a NULL pointer deref when calling + curl_easy_setup(curl, CURLOPT_COOKIELIST, "SESS") on a CURL handle with no + cookies data. + - Stefan Teleman brought a patch to fix the default curlbuild.h file for the SunPro compilers. diff --git a/RELEASE-NOTES b/RELEASE-NOTES index ed9056999f5424..e767d81976514d 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -46,6 +46,7 @@ This release includes the following bugfixes: o rare Location: follow bug with the multi interface o the configure script can now detect gnutls with pkg-config o curlbuild.h was adjusted for SunPro compilers + o CURLOPT_COOKIELIST set to "SESS" on an easy handle with no cookies data This release includes the following known bugs: @@ -58,6 +59,6 @@ advice from friends like these: Markus Koetter, Josef Wolf, Vlad Grachov, Pawel Kierski, Igor Novoseltsev, Fred Machado, Ken Hirsch, Keshav Krity, Patrick Monnerat, Mark Karpeles, Anthony Bryan, Peter Korsgaard, Phil Lisiecki, Bas Mevissen, Rob Crittenden, - Emil Romanus, Karl Moerder, Daniel Black, Stefan Teleman + Emil Romanus, Karl Moerder, Daniel Black, Stefan Teleman, Michael Wallner Thanks! (and sorry if I forgot to mention someone) diff --git a/TODO-RELEASE b/TODO-RELEASE index 0d3729005a1c86..07b926fa5bf2cc 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -1,8 +1,6 @@ To be addressed in 7.19.3 (planned release: January 2009) ========================= -209 - [PATCH] Curl_cookie_clearsess segfaults on new handle - 210 - [PATCH] TFTP: Fix Connect and Transfer Timeout Behavior 211 - Building and using static libcurl on Windows with VS2008 @@ -21,4 +19,9 @@ To be addressed in 7.19.4 (planned release: March 2009) 208 - Patch to allow GSSAPI authentication to a socks5 server -214 - +214 - progress bar prefix, second try (for the curl tool) + +215 - Patch for Metalink Support (for the curl tool) + +216 - + diff --git a/lib/cookie.c b/lib/cookie.c index 4db1a5621890e4..4f768f2db11798 100644 --- a/lib/cookie.c +++ b/lib/cookie.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2008, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -878,7 +878,7 @@ void Curl_cookie_clearsess(struct CookieInfo *cookies) { struct Cookie *first, *curr, *next, *prev = NULL; - if(!cookies->cookies) + if(!cookies->cookies || !cookies->cookies) return; first = curr = prev = cookies->cookies;