Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/unzip Ignore malformed directory entries as created ...
details: https://anonhg.NetBSD.org/src/rev/85122e949559
branches: trunk
changeset: 320785:85122e949559
user: joerg <joerg%NetBSD.org@localhost>
date: Thu Jul 19 18:04:25 2018 +0000
description:
Ignore malformed directory entries as created by Dropbox ("/").
diffstat:
usr.bin/unzip/unzip.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diffs (32 lines):
diff -r fac8f71d9e17 -r 85122e949559 usr.bin/unzip/unzip.c
--- a/usr.bin/unzip/unzip.c Thu Jul 19 11:09:38 2018 +0000
+++ b/usr.bin/unzip/unzip.c Thu Jul 19 18:04:25 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: unzip.c,v 1.23 2017/04/20 13:11:35 joerg Exp $ */
+/* $NetBSD: unzip.c,v 1.24 2018/07/19 18:04:25 joerg Exp $ */
/*-
* Copyright (c) 2009, 2010 Joerg Sonnenberger <joerg%NetBSD.org@localhost>
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: unzip.c,v 1.23 2017/04/20 13:11:35 joerg Exp $");
+__RCSID("$NetBSD: unzip.c,v 1.24 2018/07/19 18:04:25 joerg Exp $");
#include <sys/queue.h>
#include <sys/stat.h>
@@ -387,6 +387,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;
Home |
Main Index |
Thread Index |
Old Index