[krbdev.mit.edu #1988] profile library fails to handle space in front of comments

Public Submitter via RT rt-comment at krbdev.mit.edu
Mon Jul 11 18:58:21 EDT 2005


Here's the trivial patch to fix this, courtesy of Jeremie Koenig.

--- krb5/trunk/krb5/src/util/profile/prof_parse.c	2005-07-11 03:25:00
UTC (rev 1924)
+++ krb5/trunk/krb5/src/util/profile/prof_parse.c	2005-07-11 22:48:16
UTC (rev 1925)
@@ -89,10 +89,10 @@
 	
 	if (*line == 0)
 		return 0;
-	if (line[0] == ';' || line[0] == '#')
+	cp = skip_over_blanks(line);
+	if (cp[0] == ';' || cp[0] == '#')
 		return 0;
-	strip_line(line);
-	cp = skip_over_blanks(line);
+	strip_line(cp);
 	ch = *cp;
 	if (ch == 0)
 		return 0;


More information about the krb5-bugs mailing list