one runs out of core.
SCCS-vsn: usr.bin/mail/vars.c 2.3
* Variable handling stuff.
*/
* Variable handling stuff.
*/
-static char *SccsId = "@(#)vars.c 2.2 %G%";
+static char *SccsId = "@(#)vars.c 2.3 %G%";
/*
* Assign a value to a variable.
/*
* Assign a value to a variable.
if (equal(str, ""))
return("");
if (equal(str, ""))
return("");
- top = calloc(strlen(str)+1, 1);
+ if ((top = calloc(strlen(str)+1, 1)) == NULL)
+ panic ("Out of memory");
cp = top;
cp2 = str;
while (*cp++ = *cp2++)
cp = top;
cp2 = str;
while (*cp++ = *cp2++)