olga / rpms / glibc

Forked from rpms/glibc 5 years ago
Clone

Blame SOURCES/glibc-rh1504809-1.patch

51f0aa
commit c369d66e5426a30e4725b100d5cd28e372754f90
51f0aa
Author: Paul Eggert <eggert@cs.ucla.edu>
51f0aa
Date:   Fri Oct 20 18:41:14 2017 +0200
51f0aa
51f0aa
    CVE-2017-15670: glob: Fix one-byte overflow [BZ #22320]
51f0aa
51f0aa
diff --git a/posix/glob.c b/posix/glob.c
51f0aa
index 87d4f1bd2a7ef5a0..15cf3d5cccab0ee0 100644
51f0aa
--- a/posix/glob.c
51f0aa
+++ b/posix/glob.c
51f0aa
@@ -826,7 +826,7 @@ glob (pattern, flags, errfunc, pglob)
51f0aa
 		  *p = '\0';
51f0aa
 		}
51f0aa
 	      else
51f0aa
-		*((char *) mempcpy (newp, dirname + 1, end_name - dirname))
51f0aa
+		*((char *) mempcpy (newp, dirname + 1, end_name - dirname - 1))
51f0aa
 		  = '\0';
51f0aa
 	      user_name = newp;
51f0aa
 	    }