mirror of
https://github.com/openbsd/ports.git
synced 2026-06-17 23:13:55 +02:00
overlapped memcpy() happens in #ifndef NOMEMCPY section
(explode.c, inflate.c) and it causes SIGABRT. replace with memmove() to fix. ok tb@
This commit is contained in:
@@ -5,7 +5,7 @@ COMMENT = extract, list & test files in a ZIP archive
|
||||
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/
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user