diagnose null list passed to sendtolist
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Sat, 7 Aug 1993 21:44:55 +0000 (13:44 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Sat, 7 Aug 1993 21:44:55 +0000 (13:44 -0800)
SCCS-vsn: usr.sbin/sendmail/src/recipient.c 8.13

usr/src/usr.sbin/sendmail/src/recipient.c

index 41b7d88..73e606a 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)recipient.c        8.12 (Berkeley) %G%";
+static char sccsid[] = "@(#)recipient.c        8.13 (Berkeley) %G%";
 #endif /* not lint */
 
 # include "sendmail.h"
 #endif /* not lint */
 
 # include "sendmail.h"
@@ -62,6 +62,12 @@ sendto(list, copyf, ctladdr, qflags)
        ADDRESS *sibl;          /* sibling pointer in tree */
        ADDRESS *prev;          /* previous sibling */
 
        ADDRESS *sibl;          /* sibling pointer in tree */
        ADDRESS *prev;          /* previous sibling */
 
+       if (list == NULL)
+       {
+               syserr("sendtolist: null list");
+               return 0;
+       }
+
        if (tTd(25, 1))
        {
                printf("sendto: %s\n   ctladdr=", list);
        if (tTd(25, 1))
        {
                printf("sendto: %s\n   ctladdr=", list);