diff -Nru fcrackzip-1.0/debian/changelog fcrackzip-1.0/debian/changelog --- fcrackzip-1.0/debian/changelog 2010-01-05 18:52:48.000000000 +0000 +++ fcrackzip-1.0/debian/changelog 2010-10-25 14:11:27.000000000 +0000 @@ -1,3 +1,17 @@ +fcrackzip (1.0-2) unstable; urgency=low + + * debian/compat + - Update to 8. + * debian/control + - (Build-Depends): Update to debhelper 8. + - (Standards-Version): Update to 3.9.1. + * debian/patches + - (20): Refresh. Add also fix for unescaped passwords that cause "sh: + Syntax error: Unterminated quoted string". Patch thanks to Richard + Corner from Ubuntu (see LP#350640). + + -- Jari Aalto Mon, 25 Oct 2010 17:11:27 +0300 + fcrackzip (1.0-1) unstable; urgency=low * New maintainer (ITA; Closes: #555125) diff -Nru fcrackzip-1.0/debian/compat fcrackzip-1.0/debian/compat --- fcrackzip-1.0/debian/compat 2010-01-05 18:52:48.000000000 +0000 +++ fcrackzip-1.0/debian/compat 2010-10-25 14:06:04.000000000 +0000 @@ -1 +1 @@ -7 +8 diff -Nru fcrackzip-1.0/debian/control fcrackzip-1.0/debian/control --- fcrackzip-1.0/debian/control 2010-01-05 18:52:48.000000000 +0000 +++ fcrackzip-1.0/debian/control 2010-10-25 14:06:04.000000000 +0000 @@ -2,8 +2,8 @@ Section: utils Priority: optional Maintainer: Jari Aalto -Build-Depends: debhelper (>= 7.1), autotools-dev -Standards-Version: 3.8.3 +Build-Depends: debhelper (>= 8), autotools-dev +Standards-Version: 3.9.1 Vcs-Browser: http://git.debian.org/?p=collab-maint/fcrackzip.git Vcs-Git: git://git.debian.org/git/collab-maint/fcrackzip.git Homepage: http://freshmeat.net/projects/fcrackzip diff -Nru fcrackzip-1.0/debian/patches/20-bug-430387-cannot-deal-files-with-special-chars.patch fcrackzip-1.0/debian/patches/20-bug-430387-cannot-deal-files-with-special-chars.patch --- fcrackzip-1.0/debian/patches/20-bug-430387-cannot-deal-files-with-special-chars.patch 2010-01-05 18:52:48.000000000 +0000 +++ fcrackzip-1.0/debian/patches/20-bug-430387-cannot-deal-files-with-special-chars.patch 2010-10-25 14:07:37.000000000 +0000 @@ -1,18 +1,21 @@ -From f681ef1c9feee2833f4e62aa7b9d8c74595a14d8 Mon Sep 17 00:00:00 2001 +From 0fe92dade96e4ad947da308c028b407125867738 Mon Sep 17 00:00:00 2001 From: Jari Aalto -Date: Tue, 5 Jan 2010 20:06:17 +0200 -Subject: [PATCH] main.c: (path_for_shell): handle special file names +Date: Mon, 25 Oct 2010 17:07:08 +0300 +Subject: [PATCH] handle special file names and passwords +Organization: Private +Content-Type: text/plain; charset="utf-8" +Content-Transfer-Encoding: 8bit Signed-off-by: Jari Aalto --- - main.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- - 1 files changed, 59 insertions(+), 1 deletions(-) + main.c | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- + 1 files changed, 100 insertions(+), 1 deletions(-) diff --git a/main.c b/main.c -index f632241..1de75e6 100644 +index f632241..d18c482 100644 --- a/main.c +++ b/main.c -@@ -44,13 +44,71 @@ static int modul = 1; +@@ -44,13 +44,112 @@ static int modul = 1; static FILE *dict_file; @@ -32,6 +35,7 @@ + switch (ch) + { + /* ASCII table order */ ++ case 0x20: /* space */ + case '!': + case '"': + case '#': @@ -42,7 +46,7 @@ + case ')': + case '*': + case '+': -+ case 0x2C: ++ case 0x2C: /* comma */ + case ':': + case ';': + case '<': @@ -56,6 +60,43 @@ + case '{': + case '|': + case '}': ++ case '~': ++ /* backslash special characters */ ++ *p++ = '\\'; ++ *p++ = ch; ++ break; ++ default: ++ *p++ = ch; ++ } ++ } ++ ++ /* terminate string */ ++ *p = '\0'; ++ ++ return dest; ++} ++ ++char * ++escape_pw (char *dest, const char *str) ++{ ++ /* backslash shell special charatcers */ ++ ++ char ch, *p = dest; ++ size_t len = strlen(str); ++ int i; ++ ++ for (i = 0; i < len; i++) ++ { ++ ch = str[i]; ++ ++ switch (ch) ++ { ++ /* ASCII table order */ ++ case '"': ++ case '$': ++ case 0x27: /* single quote */ ++ case '\\': ++ case '`': + /* backslash special characters */ + *p++ = '\\'; + *p++ = ch; @@ -76,15 +117,18 @@ { char buff[1024]; + char path[1024]; ++ char escpw[256]; int status; - sprintf (buff, "unzip -qqtP \"%s\" %s " DEVNULL, pw, file_path[0]); ++ escape_pw (escpw, pw); + path_for_shell (path, file_path[0]); + -+ sprintf (buff, "unzip -qqtP \"%s\" %s " DEVNULL, pw, path); ++ sprintf (buff, "unzip -qqtP \"%s\" %s " DEVNULL, escpw, path); ++ status = system (buff); #undef REDIR -- -1.6.5 +1.7.1