logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git
commit: a684393b702d2c6977e76584583ea9a15f31b7d4
parent 33e9115a2513430addc328937eb9d96d6f71c877
Author: Michael Forney <mforney@mforney.org>
Date:   Sat,  4 Apr 2020 22:07:03 -0700

e2fsprogs: Avoid pointer arithmetic on `void *`

Diffstat:

M.gitmodules1+
Apkg/e2fsprogs/patch/0001-libext2fs-avoid-pointer-arithmetic-on-void.patch29+++++++++++++++++++++++++++++
Mpkg/e2fsprogs/ver2+-
3 files changed, 31 insertions(+), 1 deletion(-)

diff --git a/.gitmodules b/.gitmodules @@ -42,6 +42,7 @@ [submodule "pkg/e2fsprogs/src"] path = pkg/e2fsprogs/src url = https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git + ignore = all [submodule "pkg/efibootmgr/src"] path = pkg/efibootmgr/src url = https://github.com/rhinstaller/efibootmgr diff --git a/pkg/e2fsprogs/patch/0001-libext2fs-avoid-pointer-arithmetic-on-void.patch b/pkg/e2fsprogs/patch/0001-libext2fs-avoid-pointer-arithmetic-on-void.patch @@ -0,0 +1,29 @@ +From 01d05e00694f0488236ac766a5fcfa37a17bec64 Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Sat, 4 Apr 2020 21:38:29 -0700 +Subject: [PATCH] libext2fs: avoid pointer arithmetic on `void *` + +The pointer operand to the binary `+` operator must be to a complete +object type. + +Signed-off-by: Michael Forney <mforney@mforney.org> +--- + lib/ext2fs/csum.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/ext2fs/csum.c b/lib/ext2fs/csum.c +index a7172580..54b53a3c 100644 +--- a/lib/ext2fs/csum.c ++++ b/lib/ext2fs/csum.c +@@ -274,7 +274,7 @@ static errcode_t __get_dirent_tail(ext2_filsys fs, + rec_len = translate(d->rec_len); + } + +- if ((void *)d > ((void *)dirent + fs->blocksize)) ++ if ((char *)d > ((char *)dirent + fs->blocksize)) + return EXT2_ET_DIR_CORRUPTED; + if (d != top) + return EXT2_ET_DIR_NO_SPACE_FOR_CSUM; +-- +2.26.0 + diff --git a/pkg/e2fsprogs/ver b/pkg/e2fsprogs/ver @@ -1 +1 @@ -1.45.6 r0 +1.45.6 r1