Hi,
> In sump, just replacing the two memcpy with memmove seems the way to go.
> If you want to send a diff, I'll ok it, or I can do it.
Here's the diff; bump up revision 18 and simply replace memcpy() to memmove()
(two places for explode.c, one for inflate.c).
Regards,
Index: Makefile
===================================================================
RCS file: /cvs/ports/archivers/unzip/Makefile,v
diff -u -p -r1.71 Makefile
--- Makefile 7 Nov 2023 14:19:18 -0000 1.71
+++ Makefile 13 Jan 2025 09:18:10 -0000
@@ -5,7 +5,7 @@ COMMENT = extract, list & test files in
VERSION = 6.0
DISTNAME = unzip${VERSION:S/.//}
PKGNAME = unzip-${VERSION}
-REVISION = 17
+REVISION = 18
CATEGORIES = archivers
SITES = ${SITE_SOURCEFORGE:=infozip/} \
ftp://ftp.info-zip.org/pub/infozip/src/
Index: patches/patch-explode_c
===================================================================
RCS file: patches/patch-explode_c
diff -N patches/patch-explode_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-explode_c 13 Jan 2025 09:18:10 -0000
@@ -0,0 +1,20 @@
+--- explode.c.orig Sun Dec 2 03:20:24 2007
++++ explode.c Mon Jan 13 18:12:59 2025
+@@ -336,7 +336,7 @@ unsigned bdl; /* number of distance
+ #ifndef NOMEMCPY
+ if (w - d >= e) /* (this test assumes unsigned comparison) */
+ {
+- memcpy(redirSlide + w, redirSlide + d, e);
++ memmove(redirSlide + w, redirSlide + d, e);
+ w += e;
+ d += e;
+ }
+@@ -454,7 +454,7 @@ unsigned bdl; /* number of distance low bits
+ #ifndef NOMEMCPY
+ if (w - d >= e) /* (this test assumes unsigned comparison) */
+ {
+- memcpy(redirSlide + w, redirSlide + d, e);
++ memmove(redirSlide + w, redirSlide + d, e);
+ w += e;
+ d += e;
+ }
Index: patches/patch-inflate_c
===================================================================
RCS file: patches/patch-inflate_c
diff -N patches/patch-inflate_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-inflate_c 13 Jan 2025 09:18:10 -0000
@@ -0,0 +1,11 @@
+--- inflate.c.orig Wed Jul 30 10:31:08 2008
++++ inflate.c Mon Jan 13 18:09:38 2025
+@@ -1018,7 +1018,7 @@ unsigned bl, bd; /* number of bits decoded by t
+ if ((unsigned)w - d >= e)
+ /* (this test assumes unsigned comparison) */
+ {
+- memcpy(redirSlide + (unsigned)w, redirSlide + d, e);
++ memmove(redirSlide + (unsigned)w, redirSlide + d, e);
+ w += e;
+ d += e;
+ }
--
SASANO Takayoshi (JG1UAA) <[email protected]>