[PATCH] seg fault fix

Kees Cook kees at kernel.org
Fri Dec 5 07:24:20 EST 2003


This is a patch made by the redhat folks.  I noticed it in their src.rpm 
for rsync while I was updating it for 2.5.7.  I figure at the worst, it's 
a nice bit of protection.  It would be cool to get this put into CVS.

-- 
Kees Cook
kees at kernel.org
-------------- next part --------------
--- rsync-2.4.6/main.c.foo	Fri Aug 17 11:46:03 2001
+++ rsync-2.4.6/main.c	Fri Aug 17 11:45:37 2001
@@ -534,6 +534,7 @@
 {
 	char *p, *p2;
 
+	if (!s || !*s) return NULL;
 	p = strchr(s,':');
 	if (!p) return NULL;
 	


More information about the rsync mailing list