FreeBSD Bugzilla – Attachment 197636 Details for
Bug 231827
unzip sync with NetBSD upstream
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
sync with NetBSD upstream
patch.txt (text/plain), 1.26 KB, created by
Alex Kozlov
on 2018-09-30 17:11:24 UTC
(
hide
)
Description:
sync with NetBSD upstream
Filename:
MIME Type:
Creator:
Alex Kozlov
Created:
2018-09-30 17:11:24 UTC
Size:
1.26 KB
patch
obsolete
>- Ignore malformed directory entries as created by Dropbox ("/") >- Use getline() instead of getdelim() >- Always overwrite symlinks on extraction, ever if they're newer than entries in archive >- Use libarchive 3.x interface: check result for archive_read_free() and don't call archive_read_close manually >Index: usr.sbin/unzip/unzip.c >@@ -385,6 +385,13 @@ > { > int mode; > >+ /* >+ * Dropbox likes to create '/' directory entries, just ignore >+ * such junk. >+ */ >+ if (*path == '\0') >+ return; >+ > mode = archive_entry_mode(e) & 0777; > if (mode == 0) > mode = 0755; >@@ -451,7 +458,7 @@ > free(*path); > *path = NULL; > alen = 0; >- len = getdelim(path, &alen, '\n', stdin); >+ len = getline(path, &alen, stdin); > if ((*path)[len - 1] == '\n') > (*path)[len - 1] = '\0'; > return 0; >@@ -601,7 +608,7 @@ > if (lstat(*path, &sb) == 0) { > if (u_opt || f_opt) { > /* check if up-to-date */ >- if ((S_ISREG(sb.st_mode) || S_ISLNK(sb.st_mode)) && >+ if (S_ISREG(sb.st_mode) && > (sb.st_mtim.tv_sec > mtime.tv_sec || > (sb.st_mtim.tv_sec == mtime.tv_sec && > sb.st_mtim.tv_nsec >= mtime.tv_nsec))) >@@ -916,8 +923,7 @@ > } > } > >- ac(archive_read_close(a)); >- (void)archive_read_free(a); >+ ac(archive_read_free(a)); > > if (t_opt) { > if (error_count > 0) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 231827
: 197636