Blame SOURCES/autofs-5.1.8-fix-loop-under-run-in-cache_get_offset_parent.patch

229406
autofs-5.1.8 - fix loop under run in cache_get_offset_parent()
229406
229406
From: Frank Sorenson <sorenson@redhat.com>
229406
229406
To avoid reading memory outside of the the string
229406
allocated for parent, tail needs to stop when it
229406
reaches or passes parent, even if it doesn't
229406
actually equal parent.
229406
229406
Signed-off-by: Frank Sorenson <sorenson@redhat.com>
229406
---
229406
 CHANGELOG   |    1 +
229406
 lib/cache.c |    2 +-
229406
 2 files changed, 2 insertions(+), 1 deletion(-)
229406
229406
--- autofs-5.1.4.orig/CHANGELOG
229406
+++ autofs-5.1.4/CHANGELOG
229406
@@ -86,6 +86,7 @@
229406
 - fix root offset error handling.
229406
 - fix nonstrict fail handling of last offset mount.
229406
 - dont fail on duplicate offset entry tree add.
229406
+- fix loop under run in cache_get_offset_parent().
229406
 
229406
 xx/xx/2018 autofs-5.1.5
229406
 - fix flag file permission.
229406
--- autofs-5.1.4.orig/lib/cache.c
229406
+++ autofs-5.1.4/lib/cache.c
229406
@@ -680,7 +680,7 @@ struct mapent *cache_get_offset_parent(s
229406
 		*tail = 0;
229406
 
229406
 		tail--;
229406
-		if (tail == parent)
229406
+		if (tail <= parent)
229406
 			break;
229406
 
229406
 		me = cache_lookup_distinct(mc, parent);