$OpenBSD: patch-src_utilunix_c,v 1.2 2005/02/17 21:59:11 robert Exp $
--- src/utilunix.c.orig	Fri Nov 28 16:23:19 2003
+++ src/utilunix.c	Thu Feb 17 22:28:40 2005
@@ -234,9 +234,9 @@
 	signal (SIGCHLD, SIG_DFL);
 
 	if (flags & EXECUTE_AS_SHELL)
-	    execl (shell, shell, "-c", command, NULL);
+	    execl (shell, shell, "-c", command, (char *)NULL);
 	else
-	    execlp (shell, shell, command, NULL);
+	    execlp (shell, shell, command, (char *)NULL);
 
 	_exit (127);		/* Exec error */
     } else {
@@ -429,7 +429,7 @@
 	close (2);
 	dup (old_error);
 	close (old_error);
-	len = read (error_pipe[0], msg, MAX_PIPE_SIZE);
+	len = read (error_pipe[0], msg, MAX_PIPE_SIZE - 1);
 
 	if (len >= 0)
 	    msg[len] = 0;
