From c369d66e5426a30e4725b100d5cd28e372754f90 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 20 Oct 2017 18:41:14 +0200 Subject: CVE-2017-15670: glob: Fix one-byte overflow [BZ #22320] --- posix/glob.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'posix') diff --git a/posix/glob.c b/posix/glob.c index 076ab2b..15a6c0c 100644 --- a/posix/glob.c +++ b/posix/glob.c @@ -790,7 +790,7 @@ __glob (const char *pattern, int flags, int (*errfunc) (const char *, int), *p = '\0'; } else - *((char *) mempcpy (newp, dirname + 1, end_name - dirname)) + *((char *) mempcpy (newp, dirname + 1, end_name - dirname - 1)) = '\0'; user_name = newp; } -- cgit v1.1