--- linux/fs/exec.c.orig	Sat Oct 16 09:28:02 1999
+++ linux/fs/exec.c	Sat Oct 16 09:28:04 1999
@@ -214,6 +214,13 @@ static int count(char ** argv, int max)
 				return error;
 			if (!p)
 				break;
+			else {
+				char c;
+				/* We have to make sure the pointer is valid. */
+				error = get_user(c, p);
+				if (error)
+					return error;
+			}
 			argv++;
 			if (++i > max) return -E2BIG;
 		}
