--- /dev/null
+From 9110dd84f88cc0d56137ec4a04ba627f7d1d3ba4 Mon Sep 17 00:00:00 2001
+From: Jinwoo Nam <jwoo.nam@samsung.com>
+Date: Tue, 28 Apr 2020 12:09:57 +0900
+Subject: [PATCH] -d option is able to accept root directory, /
+
+[Model] wearable
+[BinType] AP
+[Customer] N/A
+
+[Issue#] N/A
+[Request] N/A
+[Occurrence Version] N/A
+
+[Problem]
+[Cause & Measure]
+[Checking Method] N/A
+
+[Team] Security Team
+[Developer] Jinwoo Nam
+[Solution company] Samsung
+[Change Type] N/A
+---
+ unix/unix.c | 22 +++++++++++-----------
+ 1 file changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/unix/unix.c b/unix/unix.c
+index bc6dad4..5872544 100644
+--- a/unix/unix.c
++++ b/unix/unix.c
+@@ -1113,18 +1113,18 @@ int checkdir(__G__ pathcomp, flag)
+ *(slash++) = '/'; /* Restore the NUL'd slash. */
+ }
+ } /* while (Path segments.) */
+- tmproot[ G.rootlen++] = '/'; /* Append slash. */
+- tmproot[ G.rootlen] = '\0'; /* NUL terminate. */
+- /* Right-size the rootpath storage. */
+- if ((G.rootpath =
+- (char *)izu_realloc( tmproot, (G.rootlen+ 1))) == NULL)
+- {
+- izu_free( tmproot);
+- G.rootlen = 0;
+- return MPN_NOMEM;
+- }
+- Trace((stderr, "rootpath now = [%s]\n", FnFilter1( G.rootpath)));
+ }
++ tmproot[ G.rootlen++] = '/'; /* Append slash. */
++ tmproot[ G.rootlen] = '\0'; /* NUL terminate. */
++ /* Right-size the rootpath storage. */
++ if ((G.rootpath =
++ (char *)izu_realloc( tmproot, (G.rootlen+ 1))) == NULL)
++ {
++ izu_free( tmproot);
++ G.rootlen = 0;
++ return MPN_NOMEM;
++ }
++ Trace((stderr, "rootpath now = [%s]\n", FnFilter1( G.rootpath)));
+ return MPN_OK;
+ }
+ #endif /* !SFX || SFX_EXDIR */
+--
+2.17.1
+
Url: http://www.info-zip.org/pub/infozip/UnZip.html
Group: Applications/Archiving
Source: unzip%{version}.tar.gz
+Source1: 0001-d-option-is-able-to-accept-root-directory.patch
Source1001: unzip.manifest
%description
%prep
%setup -q -n %{name}%{version}
cp %{SOURCE1001} .
+%{__patch} -p1 < %{SOURCE1}
ln -s unix/Makefile Makefile
%build