mirror of
https://git.yoctoproject.org/poky
synced 2026-04-13 23:02:30 +02:00
unzip: fix for CVE-2018-18384
(From OE-Core rev: 2ddb3b25ed063b47d3fe2b3e9e17b7f9d0e2a7e5) (From OE-Core rev: 5667a43ff0c8200acb8b4bde64ae0a73a983e28b) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
0561549730
commit
ca635e3c6f
39
meta/recipes-extended/unzip/unzip/CVE-2018-18384.patch
Normal file
39
meta/recipes-extended/unzip/unzip/CVE-2018-18384.patch
Normal file
@@ -0,0 +1,39 @@
|
||||
Upstream-Status: Backport [https://sourceforge.net/p/infozip/bugs/53/]
|
||||
CVE: CVE-2018-18384
|
||||
Signed-off-by: Changqing Li <changqing.li@windriver.com>
|
||||
|
||||
--- unzip60/list.c
|
||||
+++ unzip60/list.c
|
||||
@@ -97,7 +97,7 @@ int list_files(__G) /* return PK-type
|
||||
{
|
||||
int do_this_file=FALSE, cfactor, error, error_in_archive=PK_COOL;
|
||||
#ifndef WINDLL
|
||||
- char sgn, cfactorstr[10];
|
||||
+ char sgn, cfactorstr[1+10+1+1]; /* <sgn><int>%NUL */
|
||||
int longhdr=(uO.vflag>1);
|
||||
#endif
|
||||
int date_format;
|
||||
@@ -389,9 +389,9 @@ int list_files(__G) /* return PK-type
|
||||
}
|
||||
#else /* !WINDLL */
|
||||
if (cfactor == 100)
|
||||
- sprintf(cfactorstr, LoadFarString(CompFactor100));
|
||||
+ snprintf(cfactorstr, sizeof(cfactorstr), LoadFarString(CompFactor100));
|
||||
else
|
||||
- sprintf(cfactorstr, LoadFarString(CompFactorStr), sgn, cfactor);
|
||||
+ snprintf(cfactorstr, sizeof(cfactorstr), LoadFarString(CompFactorStr), sgn, cfactor);
|
||||
if (longhdr)
|
||||
Info(slide, 0, ((char *)slide, LoadFarString(LongHdrStats),
|
||||
FmZofft(G.crec.ucsize, "8", "u"), methbuf,
|
||||
@@ -471,9 +471,9 @@ int list_files(__G) /* return PK-type
|
||||
|
||||
#else /* !WINDLL */
|
||||
if (cfactor == 100)
|
||||
- sprintf(cfactorstr, LoadFarString(CompFactor100));
|
||||
+ snprintf(cfactorstr, sizeof(cfactorstr), LoadFarString(CompFactor100));
|
||||
else
|
||||
- sprintf(cfactorstr, LoadFarString(CompFactorStr), sgn, cfactor);
|
||||
+ snprintf(cfactorstr, sizeof(cfactorstr), LoadFarString(CompFactorStr), sgn, cfactor);
|
||||
if (longhdr) {
|
||||
Info(slide, 0, ((char *)slide, LoadFarString(LongFileTrailer),
|
||||
FmZofft(tot_ucsize, "8", "u"), FmZofft(tot_csize, "8", "u"),
|
||||
Reference in New Issue
Block a user