Files
poky/meta/recipes-devtools/make/make/0001-src-dir.c-fix-buffer-overflow-warning.patch
Jens Rehsack 1735b8ae62 make: 4.2.1 -> 4.3
Announcement: https://lists.gnu.org/archive/html/bug-make/2020-01/msg00057.html

1) Remove upstream provided patches 0001-glob-Do-not-assume-glibc-glob-internals.patch
   and 0002-glob-Do-not-assume-glibc-glob-internals.patch.

2) License has been changed to GPLv3 only

3) Important bug-fix is
   * https://lists.gnu.org/archive/html/bug-make/2018-09/msg00006.html

4) Backward-incompatibilities:
   * Number signs (#) appearing inside a macro reference or function invocation
     no longer introduce comments and should not be escaped with backslashes
   * Previously appending using '+=' to an empty variable would result in a value
     starting with a space.  Now the initial space is only added if the variable
     already contains some value.  Similarly, appending an empty string does not
     add a trailing space.

Fix incompatibility issues between gnulib bundled with updated make fix issues
in w32 compat sources.

(From OE-Core rev: 4a5d4cf0cc8a4a6af76f23dd8a29627042230f98)

Signed-off-by: Jens Rehsack <sno@netbsd.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-29 13:04:49 +00:00

42 lines
1.3 KiB
Diff

From cd7091a7d88306004ca98c5dafcc40f44589b105 Mon Sep 17 00:00:00 2001
From: Jens Rehsack <sno@netbsd.org>
Date: Mon, 24 Feb 2020 10:52:21 +0100
Subject: [PATCH 1/3] src/dir.c: fix buffer-overflow warning
Fix compiler warning:
src/dir.c:1294:7: warning: 'strncpy' specified bound depends on the
length of the source argument [-Wstringop-overflow=]
The existing code assumes `path` will never exceed `MAXPATHLEN`. Also the
size of the buffer is increased by 1 to hold a path with the length of
`MAXPATHLEN` and trailing `0`.
Signed-off-by: Jens Rehsack <sno@netbsd.org>
---
Upstream-Status: Pending (https://savannah.gnu.org/bugs/?57888)
src/dir.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/dir.c b/src/dir.c
index 862a18e..cad4c4a 100644
--- a/src/dir.c
+++ b/src/dir.c
@@ -1289,10 +1289,10 @@ local_stat (const char *path, struct stat *buf)
if (plen > 1 && path[plen - 1] == '.'
&& (path[plen - 2] == '/' || path[plen - 2] == '\\'))
{
- char parent[MAXPATHLEN];
+ char parent[MAXPATHLEN+1];
- strncpy (parent, path, plen - 2);
- parent[plen - 2] = '\0';
+ strncpy (parent, path, MAXPATHLEN);
+ parent[MIN(plen - 2, MAXPATHLEN)] = '\0';
if (stat (parent, buf) < 0 || !_S_ISDIR (buf->st_mode))
return -1;
}
--
2.17.1