cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: the latest prerelease

From: T. Bharath <TBharath_at_responsenetworks.com>
Date: Thu, 06 Sep 2001 02:19:08 -0400

The problem is with this loop in
int Curl_SSL_Close_All(struct SessionHandle *data)
{
  int i;
  for(i=0; i< data->set.ssl.numsessions; i++)
    /* the single-killer function handles empty table slots */
    Kill_Single_Session(&data->set.ssl.session[i]);

  /* free the cache data */
  free(data->set.ssl.session);

  return 0;
}

data->set.ssl.numsessions is preset to 5 so even if data->set.ssl.session
is not valid it invokes Kill_Single_Session five times with an invalid
pointer causing the crash.
I think we need to put a check there

"T. Bharath" wrote:

> Hi Daniel
> Iam trying the new prerelease.I have enabled ssl support.When i try to
> retrieve a non ssl url(http) at cleanup it crashes in
> Curl_SSL_Close_All. To be specific it crashes in Kill_Single_Session
> since data->set.ssl.session[i] is not a valid pointer.
> Is this a bug or do i need to initialise something.the code was running
> fine with the 7.8 version
>
> Regards
> Bharath
Received on 2001-09-06