[PATCH] Fix "-d \" option wasn't recognized issue. 70/232070/2 accepted/tizen_6.0_base accepted/tizen_6.0_base_tool accepted/tizen_6.0_base_tool_hotfix accepted/tizen_6.5_base accepted/tizen_6.5_base_tool accepted/tizen_7.0_base_hotfix accepted/tizen_7.0_base_tool accepted/tizen_7.0_base_tool_hotfix accepted/tizen_base_tool tizen_6.0_base tizen_6.0_base_hotfix tizen_6.5_base tizen_7.0_base_hotfix accepted/tizen/6.0/base/20201029.105913 accepted/tizen/6.0/base/20230713.143108 accepted/tizen/6.0/base/tool/20201029.111629 accepted/tizen/6.0/base/tool/hotfix/20201030.124429 accepted/tizen/6.0/base/tool/hotfix/20201102.085544 accepted/tizen/6.5/base/20230714.002729 accepted/tizen/6.5/base/tool/20211027.120950 accepted/tizen/7.0/base/20230714.003138 accepted/tizen/7.0/base/hotfix/20230714.003947 accepted/tizen/7.0/base/tool/20221028.120545 accepted/tizen/7.0/base/tool/hotfix/20221115.084619 accepted/tizen/8.0/base/20231005.045243 accepted/tizen/base/20200503.032317 accepted/tizen/base/20230714.003545 submit/tizen_6.0_base/20201029.184802 submit/tizen_6.0_base_hotfix/20201030.192502 submit/tizen_6.0_base_hotfix/20201102.162702 submit/tizen_6.5_base/20211026.180901 submit/tizen_6.5_base/20211027.183101 submit/tizen_6.5_base/20211027.201101 submit/tizen_7.0_base/20221028.201301 submit/tizen_7.0_base_hotfix/20221115.161701 submit/tizen_base/20200428.060034 submit/tizen_base/20201207.055733 submit/tizen_base/20201208.051231 submit/tizen_base/20201208.051733 tizen_6.0.m2_release tizen_6.5.m2_release tizen_7.0_m2_release tizen_8.0_m2_release
authorDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 28 Apr 2020 05:48:02 +0000 (14:48 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 28 Apr 2020 05:51:55 +0000 (14:51 +0900)
Change-Id: Iab0885919a27c599361fc065ca46db510e1d58c2
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
packaging/0001-d-option-is-able-to-accept-root-directory.patch [new file with mode: 0644]
packaging/unzip.spec

diff --git a/packaging/0001-d-option-is-able-to-accept-root-directory.patch b/packaging/0001-d-option-is-able-to-accept-root-directory.patch
new file mode 100644 (file)
index 0000000..379b344
--- /dev/null
@@ -0,0 +1,62 @@
+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
+
index aa2efef..7c3aca9 100644 (file)
@@ -6,6 +6,7 @@ Summary:        A utility for unpacking zip files
 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
@@ -22,6 +23,7 @@ a zip archive.
 %prep
 %setup -q -n %{name}%{version}
 cp %{SOURCE1001} .
+%{__patch} -p1 < %{SOURCE1}
 ln -s unix/Makefile Makefile
 
 %build