You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

19 lines
586 B

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