From f5193874c8b6237f3a1d5edcbb4b3fd14eb5d0c1 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Mon, 13 Dec 2021 15:26:02 +0100 Subject: [PATCH] e2fsprogs: eliminate warnings, fix strncat bug Ref #4344 --- repos/libports/lib/mk/e2fsprogs.mk | 4 +++- repos/libports/ports/e2fsprogs-lib.hash | 2 +- .../src/lib/e2fsprogs/patches/quotaio_strncat.patch | 13 +++++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 repos/libports/src/lib/e2fsprogs/patches/quotaio_strncat.patch diff --git a/repos/libports/lib/mk/e2fsprogs.mk b/repos/libports/lib/mk/e2fsprogs.mk index ddc2b914c4..f2df773ac6 100644 --- a/repos/libports/lib/mk/e2fsprogs.mk +++ b/repos/libports/lib/mk/e2fsprogs.mk @@ -4,7 +4,9 @@ INC_DIR += $(call select_from_ports,e2fsprogs-lib)/include/e2fsprogs LIBS := libc e2fsprogs_host_tools -CC_OPT += -Wno-unused-variable -Wno-unused-function -Wno-maybe-uninitialized +CC_OPT += -Wno-unused-variable -Wno-unused-function -Wno-maybe-uninitialized \ + -Wno-format-overflow -Wno-format-truncation -Wno-unused-but-set-variable \ + -Wno-address-of-packed-member -Wno-sizeof-pointer-memaccess CC_DEF += -DLOCALEDIR=\"/share/locale\" CC_DEF += -DLIBDIR=\"/lib\" diff --git a/repos/libports/ports/e2fsprogs-lib.hash b/repos/libports/ports/e2fsprogs-lib.hash index b9a9b08b67..5c571fbcb3 100644 --- a/repos/libports/ports/e2fsprogs-lib.hash +++ b/repos/libports/ports/e2fsprogs-lib.hash @@ -1 +1 @@ -9b9fa07e2adce25d2ca5adf9b80c7fce6a5556fe +6c150dd3925523ff1eb2ab782524133079743acd diff --git a/repos/libports/src/lib/e2fsprogs/patches/quotaio_strncat.patch b/repos/libports/src/lib/e2fsprogs/patches/quotaio_strncat.patch new file mode 100644 index 0000000000..a9513eeb27 --- /dev/null +++ b/repos/libports/src/lib/e2fsprogs/patches/quotaio_strncat.patch @@ -0,0 +1,13 @@ +diff --git src/lib/e2fsprogs/lib/quota/quotaio.c src/lib/e2fsprogs/lib/quota/quotaio.c +index 1bdcba6c..8bd253d4 100644 +--- src/lib/e2fsprogs/lib/quota/quotaio.c ++++ src/lib/e2fsprogs/lib/quota/quotaio.c +@@ -64,7 +64,7 @@ const char *quota_get_qf_path(const char *mntpt, int qtype, int fmt, + return NULL; + + strncpy(path_buf, mntpt, path_buf_size); +- strncat(path_buf, "/", 1); ++ strncat(path_buf, "/", path_buf_size - strlen(path_buf)); + strncat(path_buf, quota_get_qf_name(qtype, fmt, qf_name), + path_buf_size - strlen(path_buf)); +