psss / rpms / libselinux

Forked from rpms/libselinux 5 years ago
Clone
31e19c1
diff --exclude-from=exclude -N -u -r nsalibselinux/src/matchpathcon.c libselinux-1.21.10/src/matchpathcon.c
8e994c6
--- nsalibselinux/src/matchpathcon.c	2005-02-17 14:22:28.000000000 -0500
31e19c1
+++ libselinux-1.21.10/src/matchpathcon.c	2005-02-21 09:04:33.000000000 -0500
31e19c1
@@ -401,7 +401,7 @@
31e19c1
 	char *regex, *type, *context;
31e19c1
 	char *anchored_regex;
31e19c1
 	len = strlen(line_buf);
31e19c1
-	if (line_buf[len - 1] != '\n') {
31e19c1
+	if ((line_buf[len - 1] != '\n') && (line_buf[len - 1 ] != 0)) {
31e19c1
 		myprintf("%s:  line %d is too long, would be truncated, skipping\n", path, lineno); 
31e19c1
 		return 0;
03d51ea
 	}