--- lmtp2nntp_exwrap.c 2003/01/30 19:42:13 1.3
+++ lmtp2nntp_exwrap.c 2003/02/12 16:15:13 1.4
@@ -36,6 +36,8 @@
{
char *rc;
+ if (str == NULL)
+ throw(0,0,0);
if ((rc = strdup(str)) == NULL)
throw(0,0,0);
return rc;
@@ -45,6 +47,8 @@
{
char *rc;
+ if (s == NULL || n == 0)
+ throw(0,0,0);
if ((rc = str_dup(s, n)) == NULL)
throw(0,0,0);
return rc;
@@ -54,6 +58,8 @@
{
void *rc;
+ if (size == 0)
+ throw(0,0,0);
if ((rc = malloc(size)) == NULL)
throw(0,0,0);
return rc;
@@ -63,6 +69,8 @@
{
void *rc;
+ if (ptr == NULL || size == 0)
+ throw(0,0,0);
if ((rc = realloc(ptr, size)) == NULL)
throw(0,0,0);
return rc;
|