=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mail/Attic/aux.c,v retrieving revision 1.11 retrieving revision 1.12 diff -c -r1.11 -r1.12 *** src/usr.bin/mail/Attic/aux.c 1997/07/31 02:36:32 1.11 --- src/usr.bin/mail/Attic/aux.c 1997/08/04 17:30:22 1.12 *************** *** 1,4 **** ! /* $OpenBSD: aux.c,v 1.11 1997/07/31 02:36:32 millert Exp $ */ /* $NetBSD: aux.c,v 1.5 1997/05/13 06:15:52 mikel Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: aux.c,v 1.12 1997/08/04 17:30:22 millert Exp $ */ /* $NetBSD: aux.c,v 1.5 1997/05/13 06:15:52 mikel Exp $ */ /* *************** *** 38,44 **** #if 0 static char sccsid[] = "@(#)aux.c 8.1 (Berkeley) 6/6/93"; #else ! static char rcsid[] = "$OpenBSD: aux.c,v 1.11 1997/07/31 02:36:32 millert Exp $"; #endif #endif /* not lint */ --- 38,44 ---- #if 0 static char sccsid[] = "@(#)aux.c 8.1 (Berkeley) 6/6/93"; #else ! static char rcsid[] = "$OpenBSD: aux.c,v 1.12 1997/08/04 17:30:22 millert Exp $"; #endif #endif /* not lint */ *************** *** 465,472 **** { register int c; register char *cp, *cp2; - char *bufend; int gotlt, lastsp; if (name == NULL) return(NULL); --- 465,472 ---- { register int c; register char *cp, *cp2; int gotlt, lastsp; + char *nbuf, *bufend; if (name == NULL) return(NULL); *************** *** 475,484 **** return(name); /* We assume that length(input) <= length(output) */ ! if ((bufend = (char *)malloc(strlen(name) + 1)) == NULL) panic("Out of memory"); gotlt = 0; lastsp = 0; for (cp = name, cp2 = bufend; (c = *cp++) != '\0'; ) { switch (c) { case '(': --- 475,485 ---- return(name); /* We assume that length(input) <= length(output) */ ! if ((nbuf = (char *)malloc(strlen(name) + 1)) == NULL) panic("Out of memory"); gotlt = 0; lastsp = 0; + bufend = nbuf; for (cp = name, cp2 = bufend; (c = *cp++) != '\0'; ) { switch (c) { case '(': *************** *** 559,567 **** } *cp2 = 0; ! if ((bufend = realloc(bufend, strlen(bufend) + 1)) == NULL) panic("Out of memory"); ! return(bufend); } /* --- 560,568 ---- } *cp2 = 0; ! if ((nbuf = (char *)realloc(nbuf, strlen(nbuf) + 1)) == NULL) panic("Out of memory"); ! return(nbuf); } /*