curl-users
[ curl-Bugs-566835 ] strlen() with NULL ptr on Solaris
Date: Mon, 10 Jun 2002 06:33:14 -0700
Bugs item #566835, was opened at 2002-06-10 06:33
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=100976&aid=566835&group_id=976
Category: libcurl
Group: crash
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Daniel Stenberg (bagder)
Summary: strlen() with NULL ptr on Solaris
Initial Comment:
We had problems running cURL 7.9.6 on Solaris due
to a call to the standard library function strlen()
with a NULL pointer. This would cause a crash.
This happened on Solaris versions 7 and 8.
To fix the problem we wrote a new strlen() and
provided a curl cover function and a macro that
would replace calls to strlen() in the code.
The new file strlen.h has the declaration:
size_t curl_strlen(const char *s);
#define strlen(a) curl_strlen(a)
The file strlen.c contains the implementation:
#include "setup.h"
#include <string.h>
#include <ctype.h>
size_t curl_strlen(const char *s)
{
int len = 0;
if (0 != s)
len = strlen(s);
return len;
}
We included strlen.h in the following files:
base64.c
connect.c
cookie.c
escape.c
formdata.c
ftp.c
getdate.c
getpass.c
hostip.c
http.c
krb4.c
memdebug.c
mprintf.c
netrc.c
security.c
sendf.c
ssluse.c
strequal.c
telnet.c
transfer.c
url.c
version.c
Finally, we included strlen.c and strlen.h in
Makefile.am where appropriate.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=100976&aid=566835&group_id=976
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink
Received on 2002-06-10