Репозитории ALT
S: | 0.5.4.18-alt1 |
5.1: | 0.5.2-alt1 |
4.1: | 0.4.6-alt3 |
4.0: | 0.4.6-alt3 |
Группа :: Работа с файлами
Пакет: xarchiver
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: xarchiver-0.5.4-debian-encrypted-7z-archives.patch
Скачать
Скачать
From: Markus Koschany <apo@gambaru.de>
Date: Mon, 29 Sep 2014 12:25:06 +0200
Subject: encrypted 7z archives
Detect encrypted 7z archives.
Bug: https://bugs.debian.org/751122
Forwarded: https://sourceforge.net/p/xarchiver/bugs/76/
---
src/7zip.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/src/7zip.c b/src/7zip.c
index 6839f8b..1d61487 100644
--- a/src/7zip.c
+++ b/src/7zip.c
@@ -30,6 +30,7 @@ void xa_open_7zip (XArchive *archive)
{
gchar *exe;
jump_header = last_line = FALSE;
+ gboolean encrypted = FALSE;
unsigned short int i = 0;
if (sevenzr)
@@ -66,6 +67,14 @@ void xa_get_7zip_line_content (gchar *line, gpointer data)
gpointer item[5];
gint linesize = 0,a = 0;
+ if (encrypted == FALSE)
+ {
+ if ((line[16] == 'A') && (line[17] == 'E') && (line[18] == 'S'))
+ {
+ encrypted = TRUE;
+ }
+ }
+
if (last_line)
return;
@@ -127,6 +136,10 @@ void xa_get_7zip_line_content (gchar *line, gpointer data)
filename = g_strdup(line + 53);
entry = xa_set_archive_entries_for_each_row (archive,filename,item);
+ if (entry != NULL)
+ {
+ entry->is_encrypted = encrypted;
+ }
g_free(filename);
}