NULL needs to be cast to void * when passed to a variadic function like
authorben <ben@cda61777-01e9-0310-a592-d414129be87e>
Mon, 4 Apr 2005 13:44:45 +0000 (13:44 +0000)
committerben <ben@cda61777-01e9-0310-a592-d414129be87e>
Mon, 4 Apr 2005 13:44:45 +0000 (13:44 +0000)
execl().  Spotted by Damien Miller.

git-svn-id: svn://svn.tartarus.org/sgt/putty@5592 cda61777-01e9-0310-a592-d414129be87e

unix/uxproxy.c
unix/uxpty.c

index 617f5cc..209991f 100644 (file)
@@ -281,7 +281,7 @@ Socket platform_new_connection(SockAddr addr, char *hostname,
            close(i);
        fcntl(0, F_SETFD, 0);
        fcntl(1, F_SETFD, 0);
-       execl("/bin/sh", "sh", "-c", cmd, NULL);
+       execl("/bin/sh", "sh", "-c", cmd, (void *)NULL);
        _exit(255);
     }
 
index f91dc71..37a017d 100644 (file)
@@ -813,7 +813,7 @@ static const char *pty_init(void *frontend, void **backend_handle, Config *cfg,
                sprintf(shellname, "-%s", p);
            } else
                shellname = shell;
-           execl(getenv("SHELL"), shellname, NULL);
+           execl(getenv("SHELL"), shellname, (void *)NULL);
        }
 
        /*