only catch filenames if the "/" is leading
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Sun, 24 Jan 1982 06:18:57 +0000 (22:18 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Sun, 24 Jan 1982 06:18:57 +0000 (22:18 -0800)
SCCS-vsn: usr.sbin/sendmail/src/recipient.c 3.33

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

index 0cac122..737c875 100644 (file)
@@ -2,7 +2,7 @@
 # include "sendmail.h"
 # include <sys/stat.h>
 
 # include "sendmail.h"
 # include <sys/stat.h>
 
-SCCSID(@(#)recipient.c 3.32            %G%);
+SCCSID(@(#)recipient.c 3.33            %G%);
 
 /*
 **  SENDTO -- Designate a send list.
 
 /*
 **  SENDTO -- Designate a send list.
@@ -327,8 +327,9 @@ recipient(a, sendq)
                stripquotes(buf, TRUE);
 
                /* see if this is to a file */
                stripquotes(buf, TRUE);
 
                /* see if this is to a file */
-               if ((p = rindex(buf, '/')) != NULL)
+               if (buf[0] == '/')
                {
                {
+                       p = rindex(buf, '/');
                        /* check if writable or creatable */
                        if (a->q_alias == NULL && Debug == 0 && !QueueRun && !ForceMail)
                        {
                        /* check if writable or creatable */
                        if (a->q_alias == NULL && Debug == 0 && !QueueRun && !ForceMail)
                        {