summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--INFO2
-rw-r--r--NEWS66
-rwxr-xr-xcompile.sh7
-rw-r--r--configure.ac10
-rw-r--r--copr/cygwin-testdisk.spec4
-rw-r--r--copr/mingw-testdisk.spec6
-rw-r--r--copr/testdisk.spec2
-rw-r--r--linux/testdisk.spec.in15
-rw-r--r--sonar-project.properties2
-rw-r--r--src/Makefile.am3
-rw-r--r--src/askloc.c12
-rw-r--r--src/common.h5
-rw-r--r--src/file_ape.c9
-rw-r--r--src/file_evtx.c80
-rw-r--r--src/file_exe.c171
-rw-r--r--src/file_exr.c58
-rw-r--r--src/file_gz.c6
-rw-r--r--src/file_ico.c30
-rw-r--r--src/file_jpg.c2
-rw-r--r--src/file_list.c4
-rw-r--r--src/file_raf.c14
-rw-r--r--src/file_sig.c51
-rw-r--r--src/file_tiff.c14
-rw-r--r--src/file_tiff.h59
-rw-r--r--src/file_tiff_be.c181
-rw-r--r--src/file_tiff_le.c190
-rw-r--r--src/file_txt.c52
-rw-r--r--src/file_x3f.c8
-rw-r--r--src/file_x3i.c1
-rw-r--r--src/file_zip.c3
-rw-r--r--src/filegen.c22
-rw-r--r--src/filegen.h1
-rw-r--r--src/godmode.c4
-rw-r--r--src/icon_ph.rc10
-rw-r--r--src/icon_qph.rc10
-rw-r--r--src/icon_tst.rc10
-rw-r--r--src/lang.h1
-rw-r--r--src/lang/qphotorec.ca.ts86
-rw-r--r--src/lang/qphotorec.cs.ts256
-rw-r--r--src/lang/qphotorec.es.ts133
-rw-r--r--src/lang/qphotorec.fr.ts86
-rw-r--r--src/lang/qphotorec.it.ts86
-rw-r--r--src/lang/qphotorec.ja.ts86
-rw-r--r--src/lang/qphotorec.pt.ts86
-rw-r--r--src/lang/qphotorec.ru.ts86
-rw-r--r--src/lang/qphotorec.tr.ts86
-rw-r--r--src/lang/qphotorec.zh_TW.ts86
-rw-r--r--src/ntfs.c6
-rw-r--r--src/ntfs.h2
-rw-r--r--src/ntfs_fix.c2
-rw-r--r--src/partgpt.c18
-rw-r--r--src/partgptn.c3
-rw-r--r--src/partgptw.c3
-rw-r--r--src/parti386.c1
-rw-r--r--src/phmain.c6
-rw-r--r--src/photorec.c1
-rw-r--r--src/qphotorec_locale.qrc3
-rw-r--r--src/sudo.c26
-rw-r--r--src/sudo.h2
-rw-r--r--src/testdisk.c8
-rw-r--r--src/tpartwr.c7
61 files changed, 1524 insertions, 766 deletions
diff --git a/INFO b/INFO
index d85a196..da71e56 100644
--- a/INFO
+++ b/INFO
@@ -1,2 +1,2 @@
TestDisk & PhotoRec , https://www.cgsecurity.org
-Copyright (C) 1998-2018 Christophe GRENIER <grenier@cgsecurity.org>
+Copyright (C) 1998-2019 Christophe GRENIER <grenier@cgsecurity.org>
diff --git a/NEWS b/NEWS
index f7ace91..263557d 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,43 @@
Current news
-== 7.1-WIP ==
+== 7.1 ==
+== General Improvements ==
+* It should be possible to reproduce, byte for byte, every build of testdisk package in Debian https://wiki.debian.org/ReproducibleBuilds
+* Windows: Identify again the device model (Regression present in 7.0 version)
+
+== TestDisk ==
+=== Improvements ===
+* Ask confirmation when user quits the list of partitions found by TestDisk
+=== Bug fixes ===
+* Various fix for Scripted run
+
+== PhotoRec & QPhotoRec ==
+=== Improvements ===
+* Log the correct filenames in photorec.log file
+* Reduced false positives for tar
+* Fix recovery of mobius camera videos.
+* Fix recovery of progressive jpeg
+* Extract the filesize from sqlite header when available
+* Recover more fragmented files
+
+Extract of the new file formats recovered by PhotoRec:
+* .aes: Synology AES key files
+* .axp: Pinnacle Studio
+* .bdm: AVHCD index
+* .cpi: AVCHD Clip Information
+* .DS_Store: Apple Desktop Services Store
+* .dvr: RT60
+* .gi: Roxio Creator
+* .gpx: Guitar Pro 6
+* .gp4: Guitar Pro 4
+* .iam/.ipt Autodesk Inventor part
+* .icns: Apple Icon Image
+* .jsonlz4: Mozilla bookmarks
+* .lyx LyX 2.X
+* .mpl: AVHCD playlist
+* .tg Tux Guitar 1.2
+* .vdj: VirtualDJ
+* .wee: weecast
+* .xar: XAR Archive
== 7.0 ==
@@ -98,14 +136,14 @@ New file formats:
== 6.13 ==
-Fix UAC manifests for Windows, so users don't need to use right-click "Run As Administrator"
+Fix UAC manifests for Windows, so users don't need to use right-click "Run As Administrator"
TestDisk
- Fix image creation, image.dd file wasn't created (Regression introduced in 6.12)
- Detect Vmware VMFS partition
- Locate lost GFS2 partition but not yet the size
- Log HDD serial number and firmware revision
-- List NTFS Alternate Data Streams (ADS)
+- List NTFS Alternate Data Streams (ADS)
PhotoRec
- Session recovery restarts at the previous location
@@ -113,13 +151,13 @@ PhotoRec
- Better JPG recovery, there should be less cases where thumbnails were recovered instead of the picture itself.
- Handle large avi files using "AVIX" or mov files using 64-bit chunk size.
- Rename recovered pdf using the title (not perfect)
-- Major cleanup of PhotoRec core code
+- Major cleanup of PhotoRec core code
6.12
fidentify, a little utility sharing PhotoRec signature database, is now build by default. It identifies the type of data contained in a file and reports the extension as seen by PhotoRec. It is similar to the Unix file command. Add compatibility with
- libewf 20110312
- ncurses 5.8
-- ntfs-3g
+- ntfs-3g
Fix detection of Encase 6 .ewf files
TestDisk
@@ -127,14 +165,14 @@ TestDisk
- Better HPA/DCO detection: handle the case where native_max is null.
- Image Creation is now faster than previous version when there are bad sectors
- List and copy (experimental) files from exFAT filesystem
-- Improved NTFS undelete interface
+- Improved NTFS undelete interface
PhotoRec
- PhotoRec checks for EFBIG (file too large) error when writing files. It's usefull to avoid erronous message about "no free space available" when recovering to a FAT filesystem.
- Recover files from exFAT unallocated space
- Use doc/xls/ppt title to name recovered Office document, use first filename in zip archive...
- Possibility to add your own extension/custom signature to PhotoRec
-- Generated a report.xml file using Digital Forensics XML
+- Generated a report.xml file using Digital Forensics XML
6.11
TestDisk & PhotoRec 6.11 should use less CPU.
@@ -174,7 +212,7 @@ MacBook and Mac Pro.
be enabled for at least MacOSX, so users won't have to go into a command line.
- Improved Windows disk support, most internal USB card reader should now work.
- Disk model (ie. ATA ST3120026AS, _NEC DVD_RW ND-4550A...) are now reported
-under Linux.
+under Linux.
TestDisk
- New file system support has been added: encrypted LUKS, Mac HFSX, Linux Raid
@@ -243,13 +281,13 @@ InDesign .indd, Matroska .mkv, MP3 with ID3 header, MS cabinet archive
.cab, MSOffice "Open" XML .docx, .pptx, .xlsx, MS executable (PE), MS
Windows Metafile .wmf, NJStar .njx, Quickbooks .qbb and .qbw, Real Audio
.rm, registry config file .reg, RPM package .rpm, Windows registry header
-detection and Event Log .evt
+detection and Event Log .evt
6.6
General Improvements
- Encase Expert Witness Compression Format is now supported, so Computer
Forensic Experts can use TestDisk and PhotoRec more easily.
-- Under new Vista OS, harddisks are now being reported again.
+- Under new Vista OS, harddisks are now being reported again.
TestDisk
- If LBA48 support seems missing (HD bigger than 130 GB not supported by
the OS), TestDisk will warn the user. This problem is common when a user
@@ -258,7 +296,7 @@ reinstalls his OS and forgets to install the latest service patches.
some filesystem corruption has occurred; more importantly, it will allow
the user to copy whatever file data it can as well.
- FAT: Improved heuristics to find the first FAT area during boot sector
-rebuild.
+rebuild.
PhotoRec
- A new method for handling fragmented data is now used, making recovery
more reliable and faster.
@@ -269,7 +307,7 @@ efficient.
- New file formats have been added: .3g2 (Mov video family), .aif Apple
Audio, .all .cpr Cubase Song, .blend Blender, .cam Casio QV Digital Camera
Image, .flac Free Lossless Audio Codec, .mdf Microsoft SQL, .swf
-Macromedia Flash and .vcf VCard (not confused with .txt anymore)
+Macromedia Flash and .vcf VCard (not confused with .txt anymore)
6.5
TestDisk
@@ -282,7 +320,7 @@ partition to a selected directory.
PhotoRec
- New file formats have been added: AppleWorks .cwk, DIF Digital Video .dv,
DjVu .djv, Finale .mus, Incredimail .imm, .imb, iTunes mhbd, MIDI .mid,
-MS Backup, Real Media .rm & .ram, Reason .rns, ruby .rb, .xml
+MS Backup, Real Media .rm & .ram, Reason .rns, ruby .rb, .xml
- File size detection for .bmp, .pdf, .gif, Office document has been improved.
- A endless loop bug and a memory leak have been fixed.
- The I/O cache engine now caches read failure, it will speedup some recovery.
@@ -430,7 +468,7 @@ New features:
- can rebuild NTFS boot sector
- can recover JFS partition
- some advanced FAT32 functions have been added (Expert mode only)
-
+
Improvements:
- Can align partition to cylinder boundary or to head boundary.
- Doesn't abort while writing partitions if read failed.
diff --git a/compile.sh b/compile.sh
index bf7b6d3..b3c8cf5 100755
--- a/compile.sh
+++ b/compile.sh
@@ -36,6 +36,7 @@ else
fi
case "$crosscompile_target" in
"")
+ VER_LIBEWF=
;;
*-msdosdjgpp)
VER_LIBNTFS3G="2014.2.15"
@@ -57,10 +58,16 @@ case "$crosscompile_target" in
VER_NTFSPROGS=
VER_E2FSPROGS="1.42.8"
;;
+ arm-none-linux-gnueabi|powerpc-linux-gnuspe)
+ VER_LIBNTFS3G="2014.2.15"
+ VER_NTFSPROGS=
+ VER_E2FSPROGS="1.42.8"
+ ;;
*)
VER_LIBNTFS3G="2014.2.15"
VER_NTFSPROGS=
VER_E2FSPROGS="1.42.8"
+ VER_LIBEWF=
;;
esac
prefix=/usr/$crosscompile_target
diff --git a/configure.ac b/configure.ac
index 28d3240..388e952 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,11 +2,11 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.59])
-AC_INIT([testdisk],[7.1-WIP],[grenier@cgsecurity.org])
+AC_INIT([testdisk],[7.2-WIP],[grenier@cgsecurity.org])
AC_LANG(C)
sinclude(acx_pthread.m4)
sinclude(mkdir.m4)
-TESTDISKDATE="December 2018"
+TESTDISKDATE="July 2019"
AC_SUBST(TESTDISKDATE)
AC_DEFINE_UNQUOTED([TESTDISKDATE],"$TESTDISKDATE",[Date of release])
AC_CONFIG_AUX_DIR(config)
@@ -81,6 +81,10 @@ AC_ARG_WITH(jpeg-includes,
AC_ARG_WITH([ntfs],
AS_HELP_STRING([--without-ntfs],[disabled use of the ntfs library (default is NO)]))
+AC_ARG_WITH([coverity-fix],
+ AS_HELP_STRING([--with-coverity-fix],[Enable a coverity bug workaround]),
+ [CFLAGS="${CFLAGS} -D_Float128=__uint128_t -D_Float32x=int -D_Float32=int -D_Float64x=long -D_Float64=long"])
+
AC_ARG_WITH(ntfs-lib,
AS_HELP_STRING([--with-ntfs-lib=DIR],[location of the ntfs library]),
[ ntfs_lib_a="${withval}/libntfs.a"
@@ -837,7 +841,7 @@ if test "x$have_ewf" != "xyes"; then
fi
fi
#-Wconversion -Wmissing-noreturn -ffunction-sections -Wl,--gc-sections -Wl,--print-gc-sections
-for option in -Wdeclaration-after-statement -Wall -MD -Wpointer-arith -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Wwrite-strings -W -Wcast-align -Waggregate-return -Wbad-function-cast -Wcast-qual -Wundef -Wredundant-decls -Wsign-compare -Wnested-externs -Winline -Wdisabled-optimization -Wfloat-equal -Wmissing-format-attribute -Wmultichar -Wc++-compat -Wformat=2 -Wunreachable-code -Wvla
+for option in -Wdeclaration-after-statement -Wall -Wextra -MD -Wpointer-arith -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Wwrite-strings -W -Wcast-align -Waggregate-return -Wbad-function-cast -Wcast-qual -Wundef -Wredundant-decls -Wsign-compare -Wnested-externs -Winline -Wdisabled-optimization -Wfloat-equal -Wmissing-format-attribute -Wmultichar -Wc++-compat -Wformat=2 -Wunreachable-code -Wvla
do
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $option"
diff --git a/copr/cygwin-testdisk.spec b/copr/cygwin-testdisk.spec
index 83019a2..c9ccf37 100644
--- a/copr/cygwin-testdisk.spec
+++ b/copr/cygwin-testdisk.spec
@@ -1,7 +1,7 @@
%{?cygwin_package_header}
Name: cygwin-testdisk
-Version: 7.1
+Version: 7.2
Release: 0%{?dist}
Summary: TestDisk checks and undeletes partitions, PhotoRec recovers lost files
Summary(pl.UTF8): Narzędzie sprawdzające i odzyskujące partycje
@@ -111,7 +111,7 @@ PhotoRec is a signature based file recovery utility. It handles more than
%{?cygwin_debug_package}
%prep
-%setup -q -n cygwin-testdisk-%{version}
+%setup -q
%build
autoreconf -vif -I config -W all
diff --git a/copr/mingw-testdisk.spec b/copr/mingw-testdisk.spec
index 2080af0..1ae810b 100644
--- a/copr/mingw-testdisk.spec
+++ b/copr/mingw-testdisk.spec
@@ -1,7 +1,7 @@
%{?mingw_package_header}
Name: mingw-testdisk
-Version: 7.1
+Version: 7.2
Release: 0%{?dist}
Summary: TestDisk checks and undeletes partitions, PhotoRec recovers lost files
Summary(pl.UTF8): Narzędzie sprawdzające i odzyskujące partycje
@@ -27,6 +27,7 @@ BuildRequires: mingw32-ntfsprogs
BuildRequires: mingw32-openssl
BuildRequires: mingw32-pdcurses
BuildRequires: mingw32-qt5-qtbase-devel
+BuildRequires: mingw32-qt5-qttools-tools
BuildRequires: mingw32-win-iconv
BuildRequires: mingw32-zlib
@@ -41,6 +42,7 @@ BuildRequires: mingw64-ntfsprogs
BuildRequires: mingw64-openssl
BuildRequires: mingw64-pdcurses
BuildRequires: mingw64-qt5-qtbase-devel
+BuildRequires: mingw64-qt5-qttools-tools
BuildRequires: mingw64-win-iconv
BuildRequires: mingw64-zlib
@@ -116,7 +118,7 @@ PhotoRec is a signature based file recovery utility. It handles more than
%{?mingw_debug_package}
%prep
-%setup -q -n mingw-testdisk-%{version}
+%setup -q
%build
autoreconf -vif -I config -W all
diff --git a/copr/testdisk.spec b/copr/testdisk.spec
index ed612f7..e20f914 100644
--- a/copr/testdisk.spec
+++ b/copr/testdisk.spec
@@ -3,7 +3,7 @@ Summary(pl.UTF8): Narzędzie sprawdzające i odzyskujące partycje
Summary(fr.UTF8): Outil pour vérifier et restaurer des partitions
Summary(ru_RU.UTF8): Программа для проверки и восстановления разделов диска
Name: testdisk
-Version: 7.1
+Version: 7.2
Release: 0%{?dist}
License: GPLv2+
Group: Applications/System
diff --git a/linux/testdisk.spec.in b/linux/testdisk.spec.in
index 2424a15..e47e77b 100644
--- a/linux/testdisk.spec.in
+++ b/linux/testdisk.spec.in
@@ -1,5 +1,5 @@
%define ver_progsreiserfs 0.3.1-rc8
-#% define is_wip 1
+%define is_wip 1
%{?is_wip:%define ver_wip -WIP}
Summary: Tool to check and undelete partition, PhotoRec recovers lost files
@@ -10,7 +10,6 @@ Name: @PACKAGE@
Version: @VERSION@
Release: 1%{?dist}
License: GPLv2+
-Group: Applications/System
Source0: https://www.cgsecurity.org/testdisk-%{version}%{?ver_wip}.tar.bz2
Source1: progsreiserfs-%ver_progsreiserfs.tar.gz
Patch0: progsreiserfs-journal.patch
@@ -62,7 +61,6 @@ PhotoRec is a signature based file recovery utility. It handles more than
%package -n qphotorec
Summary: Signature based file carver. Recover lost files
-Group: Applications/System
%description -n qphotorec
QPhotoRec is a Qt version of PhotoRec. It is a signature based file recovery
@@ -111,10 +109,11 @@ fi
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%files
-%doc AUTHORS COPYING ChangeLog NEWS README.md THANKS
-%attr(755,root,root) %{_bindir}/fidentify
-%attr(755,root,root) %{_bindir}/photorec
-%attr(755,root,root) %{_bindir}/testdisk
+%doc AUTHORS ChangeLog NEWS README.md THANKS
+%license COPYING
+%{_bindir}/fidentify
+%{_bindir}/photorec
+%{_bindir}/testdisk
%{_mandir}/man8/fidentify.8*
%{_mandir}/man8/photorec.8*
%{_mandir}/man8/testdisk.8*
@@ -123,7 +122,7 @@ fi
%{_mandir}/zh_CN/man8/testdisk.8*
%files -n qphotorec
-%attr(755,root,root) %{_bindir}/qphotorec
+%{_bindir}/qphotorec
%{_mandir}/man8/qphotorec.8*
%{_mandir}/zh_CN/man8/qphotorec.8*
%{_datadir}/applications/qphotorec.desktop
diff --git a/sonar-project.properties b/sonar-project.properties
index 1cd2e65..e5f70a7 100644
--- a/sonar-project.properties
+++ b/sonar-project.properties
@@ -2,7 +2,7 @@
sonar.projectKey=testdisk
# this is the name and version displayed in the SonarQube UI. Was mandatory prior to SonarQube 6.1.
sonar.projectName=testdisk
-sonar.projectVersion=7.1
+sonar.projectVersion=7.2
# =====================================================
# Meta-data for the project
diff --git a/src/Makefile.am b/src/Makefile.am
index 52ea960..a7c2a2b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -120,7 +120,9 @@ file_C = filegen.c \
file_emf.c \
file_ess.c \
file_evt.c \
+ file_evtx.c \
file_exe.c \
+ file_exr.c \
file_exs.c \
file_ext.c \
file_ext2.c \
@@ -369,6 +371,7 @@ photorec_ncurses_H = addpartn.h askloc.h chgarchn.h chgtype.h chgtypen.h fat_clu
QT_TS = \
lang/qphotorec.ca.ts \
+ lang/qphotorec.cs.ts \
lang/qphotorec.es.ts \
lang/qphotorec.fr.ts \
lang/qphotorec.it.ts \
diff --git a/src/askloc.c b/src/askloc.c
index 792ed2b..4ca1130 100644
--- a/src/askloc.c
+++ b/src/askloc.c
@@ -99,7 +99,7 @@ char *get_default_location(void)
static void set_parent_directory(char *dst_directory);
static void dir_aff_entry(WINDOW *window, file_info_t *file_info);
-static int aff_txt(int line, WINDOW *window, const char *_format, ...) __attribute__ ((format (printf, 3, 4)));
+static int aff_txt(const int line, WINDOW *window, const char *_format, ...) __attribute__ ((format (printf, 3, 4)));
#if defined(DJGPP) || defined(__OS2__)
void get_dos_drive_list(struct td_list_head *list);
@@ -229,7 +229,7 @@ char *ask_location(const char*msg, const char *src_dir, const char *dst_org)
break;
/* hide filename beginning by '.' except '.' and '..' */
if(dir_entrie->d_name[0]=='.' &&
- !dir_entrie->d_name[1]=='\0' &&
+ !(dir_entrie->d_name[1]=='\0') &&
!(dir_entrie->d_name[1]=='.' && dir_entrie->d_name[2]=='\0'))
continue;
if(strlen(dst_directory) + 1 + strlen(dir_entrie->d_name) + 1 <= sizeof(current_file)
@@ -519,7 +519,6 @@ char *ask_location(const char*msg, const char *src_dir, const char *dst_org)
file_info=td_list_entry(current_file, file_info_t, list);
if(current_file!=&dir_list.list &&
(LINUX_S_ISDIR(file_info->st_mode) || LINUX_S_ISLNK(file_info->st_mode)))
- if(current_file!=&dir_list.list)
{
if(strcmp(file_info->name, ".")==0)
{
@@ -583,13 +582,14 @@ static void dir_aff_entry(WINDOW *window, file_info_t *file_info)
wprintw(window, " %s %s", datestr, file_info->name);
}
-static int aff_txt(int line, WINDOW *window, const char *_format, ...)
+static int aff_txt(const int line, WINDOW *window, const char *_format, ...)
{
+ int next_line;
va_list ap;
va_start(ap,_format);
- line=vaff_txt(line, window, _format, ap);
+ next_line=vaff_txt(line, window, _format, ap);
va_end(ap);
- return line;
+ return next_line;
}
#endif
diff --git a/src/common.h b/src/common.h
index c031222..67645f5 100644
--- a/src/common.h
+++ b/src/common.h
@@ -122,6 +122,9 @@ struct efi_guid_s
((const efi_guid_t){le32(0x00000000),le16(0x0000),le16(0x0000),0x00,0x00,{0x00,0x00,0x00,0x00,0x00,0x00}})
#define GPT_ENT_TYPE_EFI \
((const efi_guid_t){le32(0xc12a7328),le16(0xf81f),le16(0x11d2),0xba,0x4b,{0x00,0xa0,0xc9,0x3e,0xc9,0x3b}})
+/* Extended Boot Partition */
+#define GPT_ENT_TYPE_EBP \
+ ((const efi_guid_t){le32(0xbc13c2ff),le16(0x59e6),le16(0x4262),0xa3,0x52,{0xb2,0x75,0xfd,0x6f,0x71,0x72}})
#define GPT_ENT_TYPE_MBR \
((const efi_guid_t){le32(0x024dee41),le16(0x33e7),le16(0x11d3),0x9d,0x69,{0x00,0x08,0xc7,0x81,0xf3,0x9f}})
#define GPT_ENT_TYPE_FREEBSD \
@@ -174,6 +177,8 @@ struct efi_guid_s
#define GPT_ENT_TYPE_HPUX_SERVICE \
((const efi_guid_t){le32(0xe2a1e728),le16(0x32e3),le16(0x11d6),0xa6,0x82,{0x7b,0x03,0xa0,0x00,0x00,0x00}})
+#define GPT_ENT_TYPE_MAC_AFS \
+ ((const efi_guid_t){le32(0x7c3457ef),le16(0x0000),le16(0x11aa),0xaa,0x11,{0x00,0x30,0x65,0x43,0xec,0xac}})
#define GPT_ENT_TYPE_MAC_HFS \
((const efi_guid_t){le32(0x48465300),le16(0x0000),le16(0x11aa),0xaa,0x11,{0x00,0x30,0x65,0x43,0xec,0xac}})
#define GPT_ENT_TYPE_MAC_UFS \
diff --git a/src/file_ape.c b/src/file_ape.c
index 3391a39..c013880 100644
--- a/src/file_ape.c
+++ b/src/file_ape.c
@@ -31,7 +31,6 @@
#include "common.h"
static void register_header_check_ape(file_stat_t *file_stat);
-static int header_check_ape(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new);
const file_hint_t file_hint_ape= {
.extension="ape",
@@ -106,7 +105,6 @@ static int header_check_ape(const unsigned char *buffer, const unsigned int buff
if(le16(ape->nVersion)>=3980)
{
const struct APE_DESCRIPTOR *descr=(const struct APE_DESCRIPTOR*)buffer;
- const struct APE_HEADER *apeh=(const struct APE_HEADER*)&buffer[le32(descr->nDescriptorBytes)];
if(le32(descr->nDescriptorBytes) < sizeof(struct APE_DESCRIPTOR))
return 0;
if(le32(descr->nHeaderDataBytes) > 0 && le32(descr->nHeaderDataBytes) < sizeof(struct APE_HEADER))
@@ -115,8 +113,11 @@ static int header_check_ape(const unsigned char *buffer, const unsigned int buff
return 0;
if(le32(descr->nDescriptorBytes) + sizeof(struct APE_HEADER) >= buffer_size)
return 0;
- if(le16(apeh->nChannels)<1 || le16(apeh->nChannels)>2)
- return 0;
+ {
+ const struct APE_HEADER *apeh=(const struct APE_HEADER*)&buffer[le32(descr->nDescriptorBytes)];
+ if(le16(apeh->nChannels)<1 || le16(apeh->nChannels)>2)
+ return 0;
+ }
reset_file_recovery(file_recovery_new);
file_recovery_new->extension=file_hint_ape.extension;
return 1;
diff --git a/src/file_evtx.c b/src/file_evtx.c
new file mode 100644
index 0000000..68f884f
--- /dev/null
+++ b/src/file_evtx.c
@@ -0,0 +1,80 @@
+/*
+
+ File: file_evtx.c
+
+ Copyright (C) 2019 Christophe GRENIER <grenier@cgsecurity.org>
+
+ This software is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write the Free Software Foundation, Inc., 51
+ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#include <stdio.h>
+#include "types.h"
+#include "filegen.h"
+#include "common.h"
+
+struct evtx_header
+{
+ char magic[8];
+ uint64_t OldestChunk;
+ uint64_t CurrentChunkNum;
+ uint64_t NextRecordNum;
+ uint32_t HeaderPart1Len; /* 0x80 */
+ uint16_t MinorVersion; /* 1 */
+ uint16_t MajorVersion; /* 3 */
+ uint16_t HeaderSize; /* 0x1000 */
+ uint16_t ChunkCount;
+ char unk[76]; /* 0 */
+ uint32_t Flags;
+ uint32_t Checksum;
+} __attribute__ ((gcc_struct, __packed__));
+
+static void register_header_check_evtx(file_stat_t *file_stat);
+
+const file_hint_t file_hint_evtx= {
+ .extension="evtx",
+ .description="Microsoft Event Log",
+ .max_filesize=PHOTOREC_MAX_FILE_SIZE,
+ .recover=1,
+ .enable_by_default=1,
+ .register_header_check=&register_header_check_evtx
+};
+
+static int header_check_evtx(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new)
+{
+ const struct evtx_header *hdr=(const struct evtx_header *)buffer;
+ if(le32(hdr->HeaderPart1Len) != 0x80 ||
+ le16(hdr->MinorVersion) != 1 ||
+ le16(hdr->MajorVersion) != 3 ||
+ le16(hdr->HeaderSize) != 0x1000)
+ return 0;
+ reset_file_recovery(file_recovery_new);
+ file_recovery_new->extension=file_hint_evtx.extension;
+ file_recovery_new->calculated_file_size=(uint64_t)le16(hdr->HeaderSize) + (uint64_t)le16(hdr->ChunkCount) * 64 * 1024;
+ file_recovery_new->data_check=&data_check_size;
+ file_recovery_new->file_check=&file_check_size;
+ return 1;
+}
+
+static void register_header_check_evtx(file_stat_t *file_stat)
+{
+ register_header_check(0, "ElfFile", 8, &header_check_evtx, file_stat);
+}
diff --git a/src/file_exe.c b/src/file_exe.c
index 1348db5..12f1400 100644
--- a/src/file_exe.c
+++ b/src/file_exe.c
@@ -37,7 +37,6 @@
#include "log.h"
static void register_header_check_exe(file_stat_t *file_stat);
-static int header_check_exe(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new);
static void file_rename_pe_exe(file_recovery_t *file_recovery);
const file_hint_t file_hint_exe= {
@@ -51,122 +50,119 @@ const file_hint_t file_hint_exe= {
static const unsigned char exe_header[2] = {'M','Z'};
-static void register_header_check_exe(file_stat_t *file_stat)
-{
- register_header_check(0, exe_header,sizeof(exe_header), &header_check_exe, file_stat);
-}
-
static int header_check_exe(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new)
{
const struct dos_image_file_hdr *dos_hdr=(const struct dos_image_file_hdr*)buffer;
- const struct pe_image_file_hdr *pe_hdr;
if(memcmp(buffer,exe_header,sizeof(exe_header))!=0)
return 0;
- pe_hdr=(const struct pe_image_file_hdr *)(buffer+le32(dos_hdr->e_lfanew));
if(le32(dos_hdr->e_lfanew)>0 &&
- le32(dos_hdr->e_lfanew) <= buffer_size-sizeof(struct pe_image_file_hdr) &&
- (le32(pe_hdr->Magic) & 0xffff) == IMAGE_WIN16_SIGNATURE)
+ le32(dos_hdr->e_lfanew) <= buffer_size-sizeof(struct pe_image_file_hdr))
{
- /* NE Win16 */
- reset_file_recovery(file_recovery_new);
- file_recovery_new->extension=file_hint_exe.extension;
- return 1;
- }
- if(le32(dos_hdr->e_lfanew)>0 &&
- le32(dos_hdr->e_lfanew) <= buffer_size-sizeof(struct pe_image_file_hdr) &&
- (le32(pe_hdr->Magic) & 0xffff) == IMAGE_NT_SIGNATURE)
- {
- /* Windows PE */
- if(le16(pe_hdr->Characteristics) & 0x2000)
- {
- /* Dynamic Link Library */
- reset_file_recovery(file_recovery_new);
- file_recovery_new->extension="dll";
- }
- else if(le16(pe_hdr->Characteristics) & 0x02)
+ const struct pe_image_file_hdr *pe_hdr=(const struct pe_image_file_hdr *)(buffer+le32(dos_hdr->e_lfanew));
+ if((le32(pe_hdr->Magic) & 0xffff) == IMAGE_WIN16_SIGNATURE)
{
+ /* NE Win16 */
reset_file_recovery(file_recovery_new);
file_recovery_new->extension=file_hint_exe.extension;
+ return 1;
}
- else
+ if((le32(pe_hdr->Magic) & 0xffff) == IMAGE_NT_SIGNATURE)
{
+ /* Windows PE */
+ if(le16(pe_hdr->Characteristics) & 0x2000)
+ {
+ /* Dynamic Link Library */
+ reset_file_recovery(file_recovery_new);
+ file_recovery_new->extension="dll";
+ }
+ else if(le16(pe_hdr->Characteristics) & 0x02)
+ {
+ reset_file_recovery(file_recovery_new);
+ file_recovery_new->extension=file_hint_exe.extension;
+ }
+ else
+ {
#ifdef DEBUG_EXE
- log_warning("EXE rejected, bad characteristics %02x\n", le16(pe_hdr->Characteristics));
+ log_warning("EXE rejected, bad characteristics %02x\n", le16(pe_hdr->Characteristics));
#endif
- return 0;
- }
- file_recovery_new->time=le32(pe_hdr->TimeDateStamp);
-#ifdef DEBUG_EXE
- {
- const struct pe_image_optional_hdr32 *pe_image_optional32=(const struct pe_image_optional_hdr32 *)
- (((const unsigned char*)pe_hdr + sizeof(struct pe_image_file_hdr)));
- if(le16(pe_image_optional32->Magic)==IMAGE_NT_OPTIONAL_HDR_MAGIC)
- {
- log_debug("SizeOfCode %lx\n", (long unsigned)le32(pe_image_optional32->SizeOfCode));
- log_debug("SizeOfImage %lx\n", (long unsigned)le32(pe_image_optional32->SizeOfImage));
+ return 0;
}
- else if(le16(pe_image_optional32->Magic)==IMAGE_NT_OPTIONAL_HDR64_MAGIC)
+ file_recovery_new->time=le32(pe_hdr->TimeDateStamp);
+#ifdef DEBUG_EXE
{
- const struct pe_image_optional_hdr64 *pe_image_optional64=(const struct pe_image_optional_hdr64 *)
+ const struct pe_image_optional_hdr32 *pe_image_optional32=(const struct pe_image_optional_hdr32 *)
(((const unsigned char*)pe_hdr + sizeof(struct pe_image_file_hdr)));
+ if(le16(pe_image_optional32->Magic)==IMAGE_NT_OPTIONAL_HDR_MAGIC)
+ {
+ log_debug("SizeOfCode %lx\n", (long unsigned)le32(pe_image_optional32->SizeOfCode));
+ log_debug("SizeOfImage %lx\n", (long unsigned)le32(pe_image_optional32->SizeOfImage));
+ }
+ else if(le16(pe_image_optional32->Magic)==IMAGE_NT_OPTIONAL_HDR64_MAGIC)
+ {
+ const struct pe_image_optional_hdr64 *pe_image_optional64=(const struct pe_image_optional_hdr64 *)
+ (((const unsigned char*)pe_hdr + sizeof(struct pe_image_file_hdr)));
+ }
+ log_debug("PE image opt 0x%lx-0x%lx\n", (long unsigned)sizeof(struct pe_image_file_hdr),
+ (long unsigned)(sizeof(struct pe_image_file_hdr) + le16(pe_hdr->SizeOfOptionalHeader) - 1));
}
- log_debug("PE image opt 0x%lx-0x%lx\n", (long unsigned)sizeof(struct pe_image_file_hdr),
- (long unsigned)(sizeof(struct pe_image_file_hdr) + le16(pe_hdr->SizeOfOptionalHeader) - 1));
- }
#endif
- {
- unsigned int i;
- uint64_t sum=0;
- const struct pe_image_section_hdr *pe_image_section=(const struct pe_image_section_hdr*)
- ((const unsigned char*)pe_hdr + sizeof(struct pe_image_file_hdr) + le16(pe_hdr->SizeOfOptionalHeader));
- for(i=0;
- i<le16(pe_hdr->NumberOfSections) &&
- (const unsigned char*)(pe_image_section+1) <= buffer+buffer_size;
- i++,pe_image_section++)
{
- if(le32(pe_image_section->SizeOfRawData)>0)
+ unsigned int i;
+ uint64_t sum=0;
+ const struct pe_image_section_hdr *pe_image_section=(const struct pe_image_section_hdr*)
+ ((const unsigned char*)pe_hdr + sizeof(struct pe_image_file_hdr) + le16(pe_hdr->SizeOfOptionalHeader));
+ for(i=0;
+ i<le16(pe_hdr->NumberOfSections) &&
+ (const unsigned char*)(pe_image_section+1) <= buffer+buffer_size;
+ i++,pe_image_section++)
{
+ if(le32(pe_image_section->SizeOfRawData)>0)
+ {
+ const uint64_t tmp=(uint64_t)le32(pe_image_section->PointerToRawData) + le32(pe_image_section->SizeOfRawData);
#ifdef DEBUG_EXE
- log_debug("%s 0x%lx-0x%lx\n", pe_image_section->Name,
- (unsigned long)le32(pe_image_section->PointerToRawData),
- (unsigned long)le32(pe_image_section->PointerToRawData)+le32(pe_image_section->SizeOfRawData)-1);
+ log_debug("%s 0x%lx-0x%lx\n", pe_image_section->Name,
+ (unsigned long)le32(pe_image_section->PointerToRawData),
+ (unsigned long)(tmp-1));
#endif
- if(le32(pe_image_section->SizeOfRawData)%32==0)
- {
- if(sum < le32(pe_image_section->PointerToRawData) + le32(pe_image_section->SizeOfRawData))
- sum=le32(pe_image_section->PointerToRawData) + le32(pe_image_section->SizeOfRawData);
+ if(le32(pe_image_section->SizeOfRawData)%32==0)
+ {
+ if(sum < tmp)
+ sum=tmp;
+ }
}
- }
- if(le16(pe_image_section->NumberOfRelocations)>0)
- {
+ if(le16(pe_image_section->NumberOfRelocations)>0)
+ {
+ const uint64_t tmp=(uint64_t)le32(pe_image_section->PointerToRelocations)+ 1*le16(pe_image_section->NumberOfRelocations);
#ifdef DEBUG_EXE
- log_debug("relocations 0x%lx-0x%lx\n",
- (unsigned long)le32(pe_image_section->PointerToRelocations),
- (unsigned long)le32(pe_image_section->PointerToRelocations)+1*le16(pe_image_section->NumberOfRelocations)-1);
+ log_debug("relocations 0x%lx-0x%lx\n",
+ (unsigned long)le32(pe_image_section->PointerToRelocations),
+ (unsigned long)(tmp-1));
#endif
- if(sum < le32(pe_image_section->PointerToRelocations)+ 1*le16(pe_image_section->NumberOfRelocations))
- sum = le32(pe_image_section->PointerToRelocations)+ 1*le16(pe_image_section->NumberOfRelocations);
+ if(sum < tmp)
+ sum = tmp;
+ }
}
- }
- if(le32(pe_hdr->NumberOfSymbols)>0)
- {
+ if(le32(pe_hdr->NumberOfSymbols)>0)
+ {
+ const uint64_t tmp=(uint64_t)le32(pe_hdr->PointerToSymbolTable)+ IMAGE_SIZEOF_SYMBOL*(uint64_t)le32(pe_hdr->NumberOfSymbols);
#ifdef DEBUG_EXE
- log_debug("Symboles 0x%lx-0x%lx\n", (long unsigned)le32(pe_hdr->PointerToSymbolTable),
- (long unsigned)(le32(pe_hdr->PointerToSymbolTable)+ IMAGE_SIZEOF_SYMBOL*le32(pe_hdr->NumberOfSymbols))-1);
+ log_debug("Symboles 0x%lx-0x%lx\n", (long unsigned)le32(pe_hdr->PointerToSymbolTable),
+ (long unsigned)(tmp-1));
#endif
- if(le32(pe_hdr->NumberOfSymbols)<0x10000)
- {
- if(sum < le32(pe_hdr->PointerToSymbolTable)+ IMAGE_SIZEOF_SYMBOL*le32(pe_hdr->NumberOfSymbols))
- sum = le32(pe_hdr->PointerToSymbolTable)+ IMAGE_SIZEOF_SYMBOL*le32(pe_hdr->NumberOfSymbols);
+ if(le32(pe_hdr->NumberOfSymbols)<0x10000)
+ {
+ if(sum < tmp)
+ sum = tmp;
+ }
}
+ /* It's not perfect, EXE overlay are not recovered */
+ file_recovery_new->calculated_file_size=sum;
}
- /* It's not perfect, EXE overlay are not recovered */
- file_recovery_new->calculated_file_size=sum;
+ file_recovery_new->data_check=&data_check_size;
+ file_recovery_new->file_check=&file_check_size;
+ file_recovery_new->file_rename=&file_rename_pe_exe;
+ return 1;
}
- file_recovery_new->data_check=&data_check_size;
- file_recovery_new->file_check=&file_check_size;
- file_recovery_new->file_rename=&file_rename_pe_exe;
- return 1;
}
if(le16(dos_hdr->bytes_in_last_block) <= 512 &&
le16(dos_hdr->blocks_in_file) > 0 &&
@@ -520,3 +516,8 @@ static void file_rename_pe_exe(file_recovery_t *file_recovery)
}
fclose(file);
}
+
+static void register_header_check_exe(file_stat_t *file_stat)
+{
+ register_header_check(0, exe_header,sizeof(exe_header), &header_check_exe, file_stat);
+}
diff --git a/src/file_exr.c b/src/file_exr.c
new file mode 100644
index 0000000..f0df6ba
--- /dev/null
+++ b/src/file_exr.c
@@ -0,0 +1,58 @@
+/*
+
+ File: file_exr.c
+
+ Copyright (C) 2019 Christophe GRENIER <grenier@cgsecurity.org>
+
+ This software is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write the Free Software Foundation, Inc., 51
+ Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#include <stdio.h>
+#include "types.h"
+#include "filegen.h"
+
+static void register_header_check_exr(file_stat_t *file_stat);
+
+const file_hint_t file_hint_exr= {
+ .extension="exr",
+ .description="OpenEXR",
+ .max_filesize=PHOTOREC_MAX_FILE_SIZE,
+ .recover=1,
+ .enable_by_default=1,
+ .register_header_check=&register_header_check_exr
+};
+
+/* https://www.openexr.com/documentation/openexrfilelayout.pdf */
+static int header_check_exr(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new)
+{
+ reset_file_recovery(file_recovery_new);
+ file_recovery_new->extension=file_hint_exr.extension;
+ file_recovery_new->min_filesize=0x20;
+ return 1;
+}
+
+static void register_header_check_exr(file_stat_t *file_stat)
+{
+ /* OpenEXR v2 */
+ static const unsigned char exr_header[5]= { 'v' , 0x2f, '1' , 0x01, 0x02 };
+ register_header_check(0, exr_header, sizeof(exr_header), &header_check_exr, file_stat);
+}
diff --git a/src/file_gz.c b/src/file_gz.c
index 31f4e12..0ef52e0 100644
--- a/src/file_gz.c
+++ b/src/file_gz.c
@@ -241,6 +241,12 @@ static int header_check_gz(const unsigned char *buffer, const unsigned int buffe
file_recovery_new->extension="prproj";
return 1;
}
+ if(memcmp(buffer_uncompr, "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<gnc-v2", 47)==0)
+ {
+ /* GnuCash, http://gnucash.org/ */
+ file_recovery_new->extension="gnucash";
+ return 1;
+ }
if(strstr((const char*)&buffer_uncompr, "<!DOCTYPE KMYMONEY-FILE>")!=NULL)
{
file_recovery_new->extension="kmy";
diff --git a/src/file_ico.c b/src/file_ico.c
index 03bebb3..af2ae41 100644
--- a/src/file_ico.c
+++ b/src/file_ico.c
@@ -33,7 +33,6 @@
#include "log.h"
static void register_header_check_ico(file_stat_t *file_stat);
-static int header_check_ico(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new);
const file_hint_t file_hint_ico= {
.extension="ico",
@@ -54,20 +53,6 @@ static const unsigned char header_ico7[6]= {0x00 , 0x00, 0x01, 0x00, 0x07, 0x00}
static const unsigned char header_ico8[6]= {0x00 , 0x00, 0x01, 0x00, 0x08, 0x00};
static const unsigned char header_ico9[6]= {0x00 , 0x00, 0x01, 0x00, 0x09, 0x00};
-
-static void register_header_check_ico(file_stat_t *file_stat)
-{
- register_header_check(0, header_ico1, sizeof(header_ico1), &header_check_ico, file_stat);
- register_header_check(0, header_ico2, sizeof(header_ico2), &header_check_ico, file_stat);
- register_header_check(0, header_ico3, sizeof(header_ico3), &header_check_ico, file_stat);
- register_header_check(0, header_ico4, sizeof(header_ico4), &header_check_ico, file_stat);
- register_header_check(0, header_ico5, sizeof(header_ico5), &header_check_ico, file_stat);
- register_header_check(0, header_ico6, sizeof(header_ico6), &header_check_ico, file_stat);
- register_header_check(0, header_ico7, sizeof(header_ico7), &header_check_ico, file_stat);
- register_header_check(0, header_ico8, sizeof(header_ico8), &header_check_ico, file_stat);
- register_header_check(0, header_ico9, sizeof(header_ico9), &header_check_ico, file_stat);
-}
-
/*
* http://en.wikipedia.org/wiki/ICO_(icon_image_file_format)
*/
@@ -103,7 +88,7 @@ static int header_check_ico(const unsigned char *buffer, const unsigned int buff
if(le16(ico->reserved)!=0 || le16(ico->type)!=1 || le16(ico->count)==0)
return 0;
for(i=0, ico_dir=(const struct ico_directory*)(ico+1);
- i<le16(ico->count);
+ (const unsigned char *)(ico_dir+1) <= buffer+buffer_size && i<le16(ico->count);
i++, ico_dir++)
{
#ifdef DEBUG_ICO
@@ -157,3 +142,16 @@ static int header_check_ico(const unsigned char *buffer, const unsigned int buff
file_recovery_new->file_check=&file_check_size;
return 1;
}
+
+static void register_header_check_ico(file_stat_t *file_stat)
+{
+ register_header_check(0, header_ico1, sizeof(header_ico1), &header_check_ico, file_stat);
+ register_header_check(0, header_ico2, sizeof(header_ico2), &header_check_ico, file_stat);
+ register_header_check(0, header_ico3, sizeof(header_ico3), &header_check_ico, file_stat);
+ register_header_check(0, header_ico4, sizeof(header_ico4), &header_check_ico, file_stat);
+ register_header_check(0, header_ico5, sizeof(header_ico5), &header_check_ico, file_stat);
+ register_header_check(0, header_ico6, sizeof(header_ico6), &header_check_ico, file_stat);
+ register_header_check(0, header_ico7, sizeof(header_ico7), &header_check_ico, file_stat);
+ register_header_check(0, header_ico8, sizeof(header_ico8), &header_check_ico, file_stat);
+ register_header_check(0, header_ico9, sizeof(header_ico9), &header_check_ico, file_stat);
+}
diff --git a/src/file_jpg.c b/src/file_jpg.c
index 8c8ae08..bf82acd 100644
--- a/src/file_jpg.c
+++ b/src/file_jpg.c
@@ -1449,7 +1449,7 @@ static uint64_t jpg_check_structure(file_recovery_t *file_recovery, const unsign
{
unsigned int offset;
file_recovery->offset_error=0;
- for(offset=file_recovery->blocksize; offset < nbytes && file_recovery->offset_error==0; offset+=file_recovery->blocksize)
+ for(offset=file_recovery->blocksize; offset + 30 < nbytes && file_recovery->offset_error==0; offset+=file_recovery->blocksize)
{
if(buffer[offset]==0xff && buffer[offset+1]==0xd8 && buffer[offset+2]==0xff &&
((buffer[offset+3]==0xe1 && memcmp(&buffer[offset+6], "http://ns.adobe.com/xap/", 24)!=0)
diff --git a/src/file_list.c b/src/file_list.c
index 61a1dd5..f706680 100644
--- a/src/file_list.c
+++ b/src/file_list.c
@@ -121,7 +121,9 @@ extern const file_hint_t file_hint_elf;
extern const file_hint_t file_hint_emf;
extern const file_hint_t file_hint_ess;
extern const file_hint_t file_hint_evt;
+extern const file_hint_t file_hint_evtx;
extern const file_hint_t file_hint_exe;
+extern const file_hint_t file_hint_exr;
extern const file_hint_t file_hint_exs;
extern const file_hint_t file_hint_ext2_sb;
extern const file_hint_t file_hint_ext2_fs;
@@ -458,7 +460,9 @@ file_enable_t list_file_enable[]=
{ .enable=0, .file_hint=&file_hint_emf },
{ .enable=0, .file_hint=&file_hint_ess },
{ .enable=0, .file_hint=&file_hint_evt },
+ { .enable=0, .file_hint=&file_hint_evtx },
{ .enable=0, .file_hint=&file_hint_exe },
+ { .enable=0, .file_hint=&file_hint_exr },
{ .enable=0, .file_hint=&file_hint_exs },
{ .enable=0, .file_hint=&file_hint_ext2_sb },
{ .enable=0, .file_hint=&file_hint_ext2_fs },
diff --git a/src/file_raf.c b/src/file_raf.c
index 7912485..e171c9e 100644
--- a/src/file_raf.c
+++ b/src/file_raf.c
@@ -42,7 +42,7 @@ const file_hint_t file_hint_raf= {
.register_header_check=&register_header_check_raf
};
-/* Documentation source: http://libopenraw.freedesktop.org/wiki/Fuji_RAF/ */
+/* Documentation source: https://libopenraw.pages.freedesktop.org/formats/raf/ */
struct header_raf
{
char magic[16];
@@ -83,16 +83,8 @@ static int header_check_raf(const unsigned char *buffer, const unsigned int buff
reset_file_recovery(file_recovery_new);
file_recovery_new->extension=file_hint_raf.extension;
file_recovery_new->calculated_file_size=size;
- if(raf->dir_version[0]=='0' && raf->dir_version[1]=='1')
- {
- file_recovery_new->data_check=&data_check_size;
- file_recovery_new->file_check=&file_check_size;
- }
- else
- {
- /* The size is bigger than calculated_file_size */
- file_recovery_new->file_check=&file_check_size_min;
- }
+ /* The size is bigger than calculated_file_size */
+ file_recovery_new->file_check=&file_check_size_min;
return 1;
}
diff --git a/src/file_sig.c b/src/file_sig.c
index 7908d3c..e75a2e8 100644
--- a/src/file_sig.c
+++ b/src/file_sig.c
@@ -42,7 +42,6 @@
#include "log.h"
static void register_header_check_sig(file_stat_t *file_stat);
-static int header_check_sig(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new);
const file_hint_t file_hint_sig= {
.extension="custom",
@@ -60,14 +59,45 @@ const file_hint_t file_hint_sig= {
typedef struct signature_s signature_t;
struct signature_s
{
+ struct td_list_head list;
const char *extension;
unsigned char *sig;
unsigned int sig_size;
unsigned int offset;
- signature_t *next;
};
-static signature_t *signatures=NULL;
+static signature_t signatures={
+ .list = TD_LIST_HEAD_INIT(signatures.list)
+};
+
+static int signature_cmp(const struct td_list_head *a, const struct td_list_head *b)
+{
+ const signature_t *sig_a=td_list_entry_const(a, const signature_t, list);
+ const signature_t *sig_b=td_list_entry_const(b, const signature_t, list);
+ int res;
+ if(sig_a->sig_size==0 && sig_b->sig_size!=0)
+ return -1;
+ if(sig_a->sig_size!=0 && sig_b->sig_size==0)
+ return 1;
+ res=sig_a->offset-sig_b->offset;
+ if(res!=0)
+ return res;
+ if(sig_a->sig_size<=sig_b->sig_size)
+ {
+ res=memcmp(sig_a->sig,sig_b->sig, sig_a->sig_size);
+ if(res!=0)
+ return res;
+ return 1;
+ }
+ else
+ {
+ res=memcmp(sig_a->sig,sig_b->sig, sig_b->sig_size);
+ if(res!=0)
+ return res;
+ return -1;
+ }
+}
+
static void signature_insert(const char *extension, unsigned int offset, unsigned char *sig, unsigned int sig_size)
{
/* FIXME: small memory leak */
@@ -76,15 +106,15 @@ static void signature_insert(const char *extension, unsigned int offset, unsigne
newsig->sig=sig;
newsig->sig_size=sig_size;
newsig->offset=offset;
- newsig->next=signatures;
- signatures=newsig;
+ td_list_add_sorted(&newsig->list, &signatures.list, signature_cmp);
}
static int header_check_sig(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new)
{
- signature_t *sig;
- for(sig=signatures; sig!=NULL; sig=sig->next)
+ struct td_list_head *pos;
+ td_list_for_each(pos, &signatures.list)
{
+ const signature_t *sig = td_list_entry(pos, signature_t, list);
if(memcmp(&buffer[sig->offset], sig->sig, sig->sig_size)==0)
{
reset_file_recovery(file_recovery_new);
@@ -179,11 +209,11 @@ static char *str_uint(char *src, unsigned int *resptr)
*resptr=res;
return src;
}
-
}
static char *parse_signature_file(file_stat_t *file_stat, char *pos)
{
+ const unsigned int signatures_empty=td_list_empty(&signatures.list);
while(*pos!='\0')
{
/* skip comments */
@@ -371,7 +401,8 @@ static char *parse_signature_file(file_stat_t *file_stat, char *pos)
log_info("register a signature for %s\n", extension);
memcpy(signature, tmp, signature_size);
register_header_check(offset, signature, signature_size, &header_check_sig, file_stat);
- signature_insert(extension, offset, signature, signature_size);
+ if(signatures_empty)
+ signature_insert(extension, offset, signature, signature_size);
}
else
{
@@ -416,5 +447,3 @@ static void register_header_check_sig(file_stat_t *file_stat)
}
free(buffer);
}
-
-
diff --git a/src/file_tiff.c b/src/file_tiff.c
index 02d0bf7..6dc113f 100644
--- a/src/file_tiff.c
+++ b/src/file_tiff.c
@@ -50,6 +50,8 @@ const file_hint_t file_hint_tiff= {
.register_header_check=&register_header_check_tiff
};
+/* @ ensures \result == 1 || \result == 2 || \result == 4 || \result == 8;
+ */
unsigned int tiff_type2size(const unsigned int type)
{
switch(type)
@@ -134,6 +136,8 @@ const char *tag_name(unsigned int tag)
const char *find_tag_from_tiff_header(const TIFFHeader *tiff, const unsigned int tiff_size, const unsigned int tag, const char **potential_error)
{
+ if(tiff_size < sizeof(TIFFHeader))
+ return NULL;
if(tiff->tiff_magic==TIFF_BIGENDIAN)
return find_tag_from_tiff_header_be(tiff, tiff_size, tag, potential_error);
else if(tiff->tiff_magic==TIFF_LITTLEENDIAN)
@@ -161,8 +165,8 @@ static void register_header_check_tiff(file_stat_t *file_stat)
{
static const unsigned char tiff_header_be[4]= { 'M','M',0x00, 0x2a};
static const unsigned char tiff_header_le[4]= { 'I','I',0x2a, 0x00};
- register_header_check(0, tiff_header_be, sizeof(tiff_header_be), &header_check_tiff_be_new, file_stat);
- register_header_check(0, tiff_header_le, sizeof(tiff_header_le), &header_check_tiff_le_new, file_stat);
+ register_header_check(0, tiff_header_be, sizeof(tiff_header_be), &header_check_tiff_be, file_stat);
+ register_header_check(0, tiff_header_le, sizeof(tiff_header_le), &header_check_tiff_le, file_stat);
}
void file_check_tiff(file_recovery_t *fr)
@@ -177,14 +181,14 @@ void file_check_tiff(file_recovery_t *fr)
return;
}
if(header.tiff_magic==TIFF_LITTLEENDIAN)
- calculated_file_size=header_check_tiff_le(fr, le32(header.tiff_diroff), 0, 0);
+ calculated_file_size=file_check_tiff_le(fr, le32(header.tiff_diroff), 0, 0);
else if(header.tiff_magic==TIFF_BIGENDIAN)
- calculated_file_size=header_check_tiff_be(fr, be32(header.tiff_diroff), 0, 0);
+ calculated_file_size=file_check_tiff_be(fr, be32(header.tiff_diroff), 0, 0);
#ifdef DEBUG_TIFF
log_info("TIFF Current %llu\n", (unsigned long long)fr->file_size);
log_info("TIFF Estimated %llu %llx\n", (unsigned long long)calculated_file_size, (unsigned long long)calculated_file_size);
#endif
- if(fr->file_size < calculated_file_size || calculated_file_size==0)
+ if(fr->file_size < calculated_file_size || calculated_file_size==0 || calculated_file_size==TIFF_ERROR)
fr->file_size=0;
/* PhotoRec isn't yet capable to find the correct filesize for
* Sony arw and dng,
diff --git a/src/file_tiff.h b/src/file_tiff.h
index ed2f86c..5ef2325 100644
--- a/src/file_tiff.h
+++ b/src/file_tiff.h
@@ -22,6 +22,7 @@
#ifdef __cplusplus
extern "C" {
#endif
+#define TIFF_ERROR 0xffffffffffffffffull
#define TIFF_BIGENDIAN 0x4d4d
#define TIFF_LITTLEENDIAN 0x4949
@@ -66,16 +67,66 @@ struct ifd_header {
TIFFDirEntry ifd;
} __attribute__ ((gcc_struct, __packed__));
+/*@
+ @ requires tiff_size >= sizeof(TIFFHeader);
+ @ requires \valid_read((const unsigned char *)tiff+(0..tiff_size-1));
+ @*/
time_t get_date_from_tiff_header(const TIFFHeader *tiff, const unsigned int tiff_size);
+
+/*@
+ @ requires \valid_read((const unsigned char *)tiff+(0..tiff_size-1));
+ @*/
const char *find_tag_from_tiff_header(const TIFFHeader *tiff, const unsigned int tiff_size, const unsigned int tag, const char **potential_error);
+
+/*@
+ @ requires \valid(file_recovery);
+ @ requires \valid(file_recovery->handle);
+ @*/
void file_check_tiff(file_recovery_t *file_recovery);
+/*@
+ @ requires tiff_size >= sizeof(TIFFHeader);
+ @ requires \valid_read((const unsigned char *)tiff+(0..tiff_size-1));
+ @ requires \valid(potential_error);
+ @*/
const char *find_tag_from_tiff_header_be(const TIFFHeader *tiff, const unsigned int tiff_size, const unsigned int tag, const char**potential_error);
+/*@
+ @ requires tiff_size >= sizeof(TIFFHeader);
+ @ requires \valid_read((const unsigned char *)tiff+(0..tiff_size-1));
+ @ requires \valid(potential_error);
+ @*/
const char *find_tag_from_tiff_header_le(const TIFFHeader *tiff, const unsigned int tiff_size, const unsigned int tag, const char**potential_error);
-uint64_t header_check_tiff_be(file_recovery_t *fr, const uint32_t tiff_diroff, const unsigned int depth, const unsigned int count);
-uint64_t header_check_tiff_le(file_recovery_t *fr, const uint32_t tiff_diroff, const unsigned int depth, const unsigned int count);
-int header_check_tiff_be_new(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new);
-int header_check_tiff_le_new(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new);
+
+/*@
+ @ requires \valid(fr);
+ @ requires \valid(fr->handle);
+ @ requires \valid_read(&fr->extension);
+ @ requires \initialized(&fr->extension);
+ @
+ */
+uint64_t file_check_tiff_be(file_recovery_t *fr, const uint32_t tiff_diroff, const unsigned int depth, const unsigned int count);
+
+/*@
+ @ requires \valid(fr);
+ @ requires \valid(fr->handle);
+ @ requires \valid_read(&fr->extension);
+ @ requires \initialized(&fr->extension);
+ @
+ */
+uint64_t file_check_tiff_le(file_recovery_t *fr, const uint32_t tiff_diroff, const unsigned int depth, const unsigned int count);
+
+/*@
+ @ requires \valid_read(buffer+(0..buffer_size-1));
+ @
+ */
+int header_check_tiff_be(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new);
+
+/*@
+ @ requires \valid_read(buffer+(0..buffer_size-1));
+ @
+ */
+int header_check_tiff_le(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new);
+
unsigned int tiff_type2size(const unsigned int type);
#ifdef DEBUG_TIFF
const char *tag_name(unsigned int tag);
diff --git a/src/file_tiff_be.c b/src/file_tiff_be.c
index e0b4390..ffb6d4b 100644
--- a/src/file_tiff_be.c
+++ b/src/file_tiff_be.c
@@ -38,9 +38,18 @@
#include "common.h"
#include "file_tiff.h"
#include "log.h"
+#if defined(__FRAMAC__)
+#include "__fc_builtin.h"
+#endif
extern const file_hint_t file_hint_jpg;
+/*@
+ @ requires \valid_read((const unsigned char*)tiff+(0..tiff_size-1));
+ @ requires \valid(potential_error);
+ @ requires \valid_read(hdr);
+ @
+ */
static const char *find_tag_from_tiff_header_be_aux(const TIFFHeader *tiff, const unsigned int tiff_size, const unsigned int tag, const char**potential_error, const struct ifd_header *hdr)
{
const TIFFDirEntry *tmp;
@@ -50,6 +59,7 @@ static const char *find_tag_from_tiff_header_be_aux(const TIFFHeader *tiff, cons
if((const char*)(hdr) <= (const char*)tiff ||
(const char*)(hdr+1) > (const char*)tiff+tiff_size)
return NULL;
+ /*@ assert \valid_read(hdr); */
nbr_fields=be16(hdr->nbr_fields);
for(i=0, tmp=&hdr->ifd;
i < nbr_fields && (const char*)(tmp+1) <= (const char*)tiff+tiff_size;
@@ -76,34 +86,47 @@ const char *find_tag_from_tiff_header_be(const TIFFHeader *tiff, const unsigned
return NULL;
ifd0=(const struct ifd_header *)((const char*)tiff + be32(tiff->tiff_diroff));
/* Bound checking */
- if((const char*)ifd0 < (const char*)tiff ||
- (const char*)(ifd0+1) > (const char*)tiff + tiff_size)
+ if((const char *)ifd0 <= (const char *)tiff ||
+ (const char *)(ifd0 + 1) > (const char *)tiff + tiff_size)
return NULL;
+ /*@ assert \valid_read(ifd0); */
{
const char *tmp=find_tag_from_tiff_header_be_aux(tiff, tiff_size, tag, potential_error, ifd0);
if(tmp)
return tmp;
}
exififd=(const struct ifd_header *)find_tag_from_tiff_header_be_aux(tiff, tiff_size, TIFFTAG_EXIFIFD, potential_error, ifd0);
- if(exififd!=NULL)
+ if((const char *)exififd > (const char *)tiff &&
+ (const char *)(exififd + 1) <= (const char *)tiff + tiff_size)
{
/* Exif */
+ /*@ assert \valid_read(exififd); */
const char *tmp=find_tag_from_tiff_header_be_aux(tiff, tiff_size, tag, potential_error, exififd);
if(tmp)
return tmp;
}
tiff_next_diroff=(const uint32_t *)(&ifd0->ifd + be16(ifd0->nbr_fields));
- if( (const char *)tiff_next_diroff >= (const char *)tiff &&
- (const char *)(tiff_next_diroff + 1) < (const char*)tiff + tiff_size &&
+ if( (const char *)tiff_next_diroff > (const char *)tiff &&
+ (const char *)(tiff_next_diroff + 1) <= (const char*)tiff + tiff_size &&
be32(*tiff_next_diroff)>0)
{
/* IFD1 */
const struct ifd_header *ifd1=(const struct ifd_header*)((const char *)tiff+be32(*tiff_next_diroff));
- return find_tag_from_tiff_header_be_aux(tiff, tiff_size, tag, potential_error, ifd1);
+ if((const char *)ifd1 > (const char *)tiff &&
+ (const char *)(ifd1 + 1) <= (const char *)tiff + tiff_size)
+ {
+ /*@ assert \valid_read(ifd1); */
+ return find_tag_from_tiff_header_be_aux(tiff, tiff_size, tag, potential_error, ifd1);
+ }
}
return NULL;
}
+/*@
+ @ requires \valid(handle);
+ @ requires \valid_read(entry_strip_offsets);
+ @ requires \valid_read(entry_strip_bytecounts);
+ @*/
static uint64_t parse_strip_be(FILE *handle, const TIFFDirEntry *entry_strip_offsets, const TIFFDirEntry *entry_strip_bytecounts)
{
const unsigned int nbr=(be32(entry_strip_offsets->tdir_count)<2048?
@@ -114,17 +137,18 @@ static uint64_t parse_strip_be(FILE *handle, const TIFFDirEntry *entry_strip_off
uint32_t *sizep;
uint64_t max_offset=0;
if(be32(entry_strip_offsets->tdir_count) != be32(entry_strip_bytecounts->tdir_count))
- return -1;
+ return TIFF_ERROR;
if(be32(entry_strip_offsets->tdir_count)==0 ||
be16(entry_strip_offsets->tdir_type)!=4 ||
be16(entry_strip_bytecounts->tdir_type)!=4)
- return -1;
+ return TIFF_ERROR;
+ /*@ assert 0 < nbr <= 2048; */
offsetp=(uint32_t *)MALLOC(nbr*sizeof(*offsetp));
if(fseek(handle, be32(entry_strip_offsets->tdir_offset), SEEK_SET) < 0 ||
fread(offsetp, sizeof(*offsetp), nbr, handle) != nbr)
{
free(offsetp);
- return -1;
+ return TIFF_ERROR;
}
sizep=(uint32_t *)MALLOC(nbr*sizeof(*sizep));
if(fseek(handle, be32(entry_strip_bytecounts->tdir_offset), SEEK_SET) < 0 ||
@@ -132,7 +156,7 @@ static uint64_t parse_strip_be(FILE *handle, const TIFFDirEntry *entry_strip_off
{
free(offsetp);
free(sizep);
- return -1;
+ return TIFF_ERROR;
}
for(i=0; i<nbr; i++)
{
@@ -145,6 +169,11 @@ static uint64_t parse_strip_be(FILE *handle, const TIFFDirEntry *entry_strip_off
return max_offset;
}
+/*@
+ @ requires type != 1 || \valid_read((const char *)val);
+ @ requires type != 3 || \valid_read((const char *)val + ( 0 .. 2));
+ @ requires type != 4 || \valid_read((const char *)val + ( 0 .. 4));
+ @*/
static unsigned int tiff_be_read(const void *val, const unsigned int type)
{
switch(type)
@@ -182,12 +211,13 @@ static uint64_t tiff_be_makernote(FILE *in, const uint32_t tiff_diroff)
uint64_t tile_bytecounts=0;
const TIFFDirEntry *entry;
if(tiff_diroff < sizeof(TIFFHeader))
- return -1;
+ return TIFF_ERROR;
if(fseek(in, tiff_diroff, SEEK_SET) < 0)
- return -1;
+ return TIFF_ERROR;
data_read=fread(buffer, 1, sizeof(buffer), in);
if(data_read<2)
- return -1;
+ return TIFF_ERROR;
+ /*@ assert 2 <= data_read <= sizeof(buffer); */
if( memcmp(buffer, sign_nikon1, sizeof(sign_nikon1))==0 ||
memcmp(buffer, sign_nikon2, sizeof(sign_nikon2))==0 ||
memcmp(buffer, sign_pentax, sizeof(sign_pentax))==0 )
@@ -198,10 +228,10 @@ static uint64_t tiff_be_makernote(FILE *in, const uint32_t tiff_diroff)
log_info("tiff_be_makernote(%lu) => %u entries\n", (long unsigned)tiff_diroff, n);
#endif
//sizeof(TIFFDirEntry)=12;
- if(n > (unsigned)(data_read-2)/12)
+ if(n > (unsigned int)(data_read-2)/12)
n=(data_read-2)/12;
if(n==0)
- return -1;
+ return TIFF_ERROR;
for(i=0;i<n;i++)
{
const uint64_t val=(uint64_t)be32(entry->tdir_count) * tiff_type2size(be16(entry->tdir_type));
@@ -220,7 +250,7 @@ static uint64_t tiff_be_makernote(FILE *in, const uint32_t tiff_diroff)
{
const uint64_t new_offset=be32(entry->tdir_offset)+val;
if(new_offset==0)
- return -1;
+ return TIFF_ERROR;
if(max_offset < new_offset)
max_offset=new_offset;
}
@@ -259,12 +289,11 @@ static uint64_t tiff_be_makernote(FILE *in, const uint32_t tiff_diroff)
}
#endif
-uint64_t header_check_tiff_be(file_recovery_t *fr, const uint32_t tiff_diroff, const unsigned int depth, const unsigned int count)
+uint64_t file_check_tiff_be(file_recovery_t *fr, const uint32_t tiff_diroff, const unsigned int depth, const unsigned int count)
{
unsigned char buffer[8192];
unsigned int i,n;
int data_read;
- const uint32_t *tiff_next_diroff;
uint64_t max_offset=0;
uint64_t alphaoffset=0;
uint64_t alphabytecount=0;
@@ -278,36 +307,47 @@ uint64_t header_check_tiff_be(file_recovery_t *fr, const uint32_t tiff_diroff, c
uint64_t tile_bytecounts=0;
unsigned int tdir_tag_old=0;
unsigned int sorted_tag_error=0;
- const TIFFDirEntry *entry=(const TIFFDirEntry *)&buffer[2];
+ const TIFFDirEntry *entries=(const TIFFDirEntry *)&buffer[2];
const TIFFDirEntry *entry_strip_offsets=NULL;
const TIFFDirEntry *entry_strip_bytecounts=NULL;
const TIFFDirEntry *entry_tile_offsets=NULL;
const TIFFDirEntry *entry_tile_bytecounts=NULL;
#ifdef DEBUG_TIFF
- log_info("header_check_tiff_be(fr, %lu, %u, %u)\n", (long unsigned)tiff_diroff, depth, count);
+ log_info("file_check_tiff_be(fr, %lu, %u, %u)\n", (long unsigned)tiff_diroff, depth, count);
#endif
if(depth>4)
- return -1;
+ return TIFF_ERROR;
if(count>16)
- return -1;
+ return TIFF_ERROR;
if(tiff_diroff < sizeof(TIFFHeader))
- return -1;
+ return TIFF_ERROR;
if(fseek(fr->handle, tiff_diroff, SEEK_SET) < 0)
- return -1;
+ return TIFF_ERROR;
data_read=fread(buffer, 1, sizeof(buffer), fr->handle);
+#if defined(__FRAMAC__)
+ data_read = Frama_C_interval(0, sizeof(buffer));
+ /*@ assert 0 <= data_read <= sizeof(buffer); */
+ Frama_C_make_unknown((char *)buffer, sizeof(buffer));
+#endif
if(data_read<2)
- return -1;
+ return TIFF_ERROR;
+ /*@ assert 2 <= data_read <= sizeof(buffer); */
n=(buffer[0]<<8)+buffer[1];
#ifdef DEBUG_TIFF
- log_info("header_check_tiff_be(fr, %lu, %u, %u) => %u entries\n", (long unsigned)tiff_diroff, depth, count, n);
+ log_info("file_check_tiff_be(fr, %lu, %u, %u) => %u entries\n", (long unsigned)tiff_diroff, depth, count, n);
#endif
- //sizeof(TIFFDirEntry)=12;
- if(n > (unsigned)(data_read-2)/12)
- n=(data_read-2)/12;
if(n==0)
- return -1;
- for(i=0;i<n;i++)
+ return TIFF_ERROR;
+ /*@ assert sizeof(TIFFDirEntry)==12; */
+ /*@
+ @ loop invariant 0 <= i <=n && i < (data_read-2)/12;
+ @ loop variant n-i;
+ @*/
+ for(i=0; i < n && i < (unsigned int)(data_read-2)/12; i++)
{
+ const TIFFDirEntry *entry=&entries[i];
+ /*@ assert 0 <= i < n; */
+ /*@ assert \valid_read(entry); */
const unsigned int tdir_tag=be16(entry->tdir_tag);
const uint64_t val=(uint64_t)be32(entry->tdir_count) * tiff_type2size(be16(entry->tdir_type));
#ifdef DEBUG_TIFF
@@ -324,15 +364,18 @@ uint64_t header_check_tiff_be(file_recovery_t *fr, const uint32_t tiff_diroff, c
#endif
if(tdir_tag_old > tdir_tag)
{ /* Entries must be sorted by tag */
- sorted_tag_error++;
- if(sorted_tag_error > 1)
- return -1;
+ if(sorted_tag_error > 0)
+ {
+ return TIFF_ERROR;
+ }
+ else
+ sorted_tag_error=1;
}
if(val>4)
{
const uint64_t new_offset=be32(entry->tdir_offset)+val;
if(new_offset==0)
- return -1;
+ return TIFF_ERROR;
if(max_offset < new_offset)
max_offset=new_offset;
}
@@ -354,18 +397,18 @@ uint64_t header_check_tiff_be(file_recovery_t *fr, const uint32_t tiff_diroff, c
case TIFFTAG_EXIFIFD:
case TIFFTAG_KODAKIFD:
{
- const uint64_t new_offset=header_check_tiff_be(fr, tmp, depth+1, 0);
- if(new_offset==-1)
- return -1;
+ const uint64_t new_offset=file_check_tiff_be(fr, tmp, depth+1, 0);
+ if(new_offset==TIFF_ERROR)
+ return TIFF_ERROR;
if(max_offset < new_offset)
max_offset=new_offset;
}
break;
case TIFFTAG_SUBIFD:
{
- const uint64_t new_offset=header_check_tiff_be(fr, tmp, depth+1, 0);
- if(new_offset==-1)
- return -1;
+ const uint64_t new_offset=file_check_tiff_be(fr, tmp, depth+1, 0);
+ if(new_offset==TIFF_ERROR)
+ return TIFF_ERROR;
if(max_offset < new_offset)
max_offset=new_offset;
}
@@ -374,8 +417,8 @@ uint64_t header_check_tiff_be(file_recovery_t *fr, const uint32_t tiff_diroff, c
case EXIFTAG_MAKERNOTE:
{
const uint64_t new_offset=tiff_be_makernote(fr->handle, tmp);
- if(new_offset==-1)
- return -1;
+ if(new_offset==TIFF_ERROR)
+ return TIFF_ERROR;
if(max_offset < new_offset)
max_offset=new_offset;
}
@@ -385,6 +428,7 @@ uint64_t header_check_tiff_be(file_recovery_t *fr, const uint32_t tiff_diroff, c
}
else if(be32(entry->tdir_count) > 1)
{
+ /*@ assert le32(entry->tdir_count) > 1; */
switch(tdir_tag)
{
case TIFFTAG_EXIFIFD:
@@ -393,30 +437,34 @@ uint64_t header_check_tiff_be(file_recovery_t *fr, const uint32_t tiff_diroff, c
if(be16(entry->tdir_type)==4)
{
const unsigned int nbr=(be32(entry->tdir_count)<32?be32(entry->tdir_count):32);
+ /*@ assert 2 <= nbr <= 32; */
+ uint32_t subifd_offsetp[32];
unsigned int j;
- uint32_t *subifd_offsetp;
if(fseek(fr->handle, be32(entry->tdir_offset), SEEK_SET) < 0)
{
- return -1;
+ return TIFF_ERROR;
}
- subifd_offsetp=(uint32_t *)MALLOC(nbr*sizeof(*subifd_offsetp));
- if(fread(subifd_offsetp, sizeof(*subifd_offsetp), nbr, fr->handle) != nbr)
+ if(fread(subifd_offsetp, sizeof(uint32_t), nbr, fr->handle) != nbr)
{
- free(subifd_offsetp);
- return -1;
+ return TIFF_ERROR;
}
+#if defined(__FRAMAC__)
+ Frama_C_make_unknown((char *)&subifd_offsetp, sizeof(subifd_offsetp));
+#endif
+ /*@
+ @ loop invariant 0 <= j <= nbr <=32;
+ @ loop variant nbr-j;
+ @*/
for(j=0; j<nbr; j++)
{
- const uint64_t new_offset=header_check_tiff_be(fr, be32(subifd_offsetp[j]), depth+1, 0);
- if(new_offset==-1)
+ const uint64_t new_offset=file_check_tiff_be(fr, be32(subifd_offsetp[j]), depth+1, 0);
+ if(new_offset==TIFF_ERROR)
{
- free(subifd_offsetp);
- return -1;
+ return TIFF_ERROR;
}
if(max_offset < new_offset)
max_offset = new_offset;
}
- free(subifd_offsetp);
}
break;
case TIFFTAG_STRIPOFFSETS:
@@ -434,7 +482,6 @@ uint64_t header_check_tiff_be(file_recovery_t *fr, const uint32_t tiff_diroff, c
}
}
tdir_tag_old=tdir_tag;
- entry++;
}
if(alphabytecount > 0 && max_offset < alphaoffset + alphabytecount)
max_offset = alphaoffset + alphabytecount;
@@ -451,30 +498,34 @@ uint64_t header_check_tiff_be(file_recovery_t *fr, const uint32_t tiff_diroff, c
if(entry_strip_offsets != NULL && entry_strip_bytecounts != NULL)
{
const uint64_t tmp=parse_strip_be(fr->handle, entry_strip_offsets, entry_strip_bytecounts);
- if(tmp==-1)
- return -1;
+ if(tmp==TIFF_ERROR)
+ return TIFF_ERROR;
if(max_offset < tmp)
max_offset=tmp;
}
if(entry_tile_offsets != NULL && entry_tile_bytecounts != NULL)
{
const uint64_t tmp=parse_strip_be(fr->handle, entry_tile_offsets, entry_tile_bytecounts);
- if(tmp==-1)
- return -1;
+ if(tmp==TIFF_ERROR)
+ return TIFF_ERROR;
if(max_offset < tmp)
max_offset=tmp;
}
- tiff_next_diroff=(const uint32_t *)entry;
- if(be32(*tiff_next_diroff) > 0)
+ if ( 2 + n*12 + 4 <= (unsigned int)data_read)
{
- const uint64_t new_offset=header_check_tiff_be(fr, be32(*tiff_next_diroff), depth+1, count+1);
- if(new_offset != -1 && max_offset < new_offset)
- max_offset=new_offset;
+ /*@ assert n <= (data_read - 6) /12; */
+ const uint32_t *tiff_next_diroff=(const uint32_t *)&entries[n];
+ if(be32(*tiff_next_diroff) > 0)
+ {
+ const uint64_t new_offset=file_check_tiff_be(fr, be32(*tiff_next_diroff), depth+1, count+1);
+ if(new_offset != TIFF_ERROR && max_offset < new_offset)
+ max_offset=new_offset;
+ }
}
return max_offset;
}
-int header_check_tiff_be_new(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new)
+int header_check_tiff_be(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new)
{
const char *potential_error=NULL;
const TIFFHeader *header=(const TIFFHeader *)buffer;
diff --git a/src/file_tiff_le.c b/src/file_tiff_le.c
index 2a4aa92..fb62732 100644
--- a/src/file_tiff_le.c
+++ b/src/file_tiff_le.c
@@ -38,10 +38,19 @@
#include "common.h"
#include "file_tiff.h"
#include "log.h"
+#if defined(__FRAMAC__)
+#include "__fc_builtin.h"
+#endif
extern const file_hint_t file_hint_raf;
extern const file_hint_t file_hint_jpg;
+/*@
+ @ requires \valid_read((const unsigned char*)tiff+(0..tiff_size-1));
+ @ requires \valid(potential_error);
+ @ requires \valid_read(hdr);
+ @
+ */
static const char *find_tag_from_tiff_header_le_aux(const TIFFHeader *tiff, const unsigned int tiff_size, const unsigned int tag, const char**potential_error, const struct ifd_header *hdr)
{
const TIFFDirEntry *tmp;
@@ -51,6 +60,7 @@ static const char *find_tag_from_tiff_header_le_aux(const TIFFHeader *tiff, cons
if((const char*)(hdr) <= (const char*)tiff ||
(const char*)(hdr+1) > (const char*)tiff+tiff_size)
return NULL;
+ /*@ assert \valid_read(hdr); */
nbr_fields=le16(hdr->nbr_fields);
for(i=0, tmp=&hdr->ifd;
i < nbr_fields && (const char*)(tmp+1) <= (const char*)tiff+tiff_size;
@@ -77,34 +87,47 @@ const char *find_tag_from_tiff_header_le(const TIFFHeader *tiff, const unsigned
return NULL;
ifd0=(const struct ifd_header *)((const char*)tiff + le32(tiff->tiff_diroff));
/* Bound checking */
- if((const char*)ifd0 < (const char*)tiff ||
- (const char*)(ifd0+1) > (const char*)tiff + tiff_size)
+ if((const char *)ifd0 <= (const char *)tiff ||
+ (const char *)(ifd0 + 1) > (const char *)tiff + tiff_size)
return NULL;
+ /*@ assert \valid_read(ifd0); */
{
const char *tmp=find_tag_from_tiff_header_le_aux(tiff, tiff_size, tag, potential_error, ifd0);
if(tmp)
return tmp;
}
exififd=(const struct ifd_header *)find_tag_from_tiff_header_le_aux(tiff, tiff_size, TIFFTAG_EXIFIFD, potential_error, ifd0);
- if(exififd!=NULL)
+ if((const char *)exififd > (const char *)tiff &&
+ (const char *)(exififd + 1) <= (const char *)tiff + tiff_size)
{
/* Exif */
+ /*@ assert \valid_read(exififd); */
const char *tmp=find_tag_from_tiff_header_le_aux(tiff, tiff_size, tag, potential_error, exififd);
if(tmp)
return tmp;
}
tiff_next_diroff=(const uint32_t *)(&ifd0->ifd + le16(ifd0->nbr_fields));
- if( (const char *)tiff_next_diroff >= (const char *)tiff &&
- (const char *)(tiff_next_diroff + 1) < (const char*)tiff + tiff_size &&
+ if( (const char *)tiff_next_diroff > (const char *)tiff &&
+ (const char *)(tiff_next_diroff + 1) <= (const char*)tiff + tiff_size &&
le32(*tiff_next_diroff)>0)
{
/* IFD1 */
const struct ifd_header *ifd1=(const struct ifd_header*)((const char *)tiff+le32(*tiff_next_diroff));
- return find_tag_from_tiff_header_le_aux(tiff, tiff_size, tag, potential_error, ifd1);
+ if((const char *)ifd1 > (const char *)tiff &&
+ (const char *)(ifd1 + 1) <= (const char *)tiff + tiff_size)
+ {
+ /*@ assert \valid_read(ifd1); */
+ return find_tag_from_tiff_header_le_aux(tiff, tiff_size, tag, potential_error, ifd1);
+ }
}
return NULL;
}
+/*@
+ @ requires \valid(handle);
+ @ requires \valid_read(entry_strip_offsets);
+ @ requires \valid_read(entry_strip_bytecounts);
+ @*/
static uint64_t parse_strip_le(FILE *handle, const TIFFDirEntry *entry_strip_offsets, const TIFFDirEntry *entry_strip_bytecounts)
{
const unsigned int nbr=(le32(entry_strip_offsets->tdir_count)<2048?
@@ -115,17 +138,18 @@ static uint64_t parse_strip_le(FILE *handle, const TIFFDirEntry *entry_strip_off
uint32_t *sizep;
uint64_t max_offset=0;
if(le32(entry_strip_offsets->tdir_count) != le32(entry_strip_bytecounts->tdir_count))
- return -1;
+ return TIFF_ERROR;
if(le32(entry_strip_offsets->tdir_count)==0 ||
le16(entry_strip_offsets->tdir_type)!=4 ||
le16(entry_strip_bytecounts->tdir_type)!=4)
- return -1;
+ return TIFF_ERROR;
+ /*@ assert 0 < nbr <= 2048; */
offsetp=(uint32_t *)MALLOC(nbr*sizeof(*offsetp));
if(fseek(handle, le32(entry_strip_offsets->tdir_offset), SEEK_SET) < 0 ||
fread(offsetp, sizeof(*offsetp), nbr, handle) != nbr)
{
free(offsetp);
- return -1;
+ return TIFF_ERROR;
}
sizep=(uint32_t *)MALLOC(nbr*sizeof(*sizep));
if(fseek(handle, le32(entry_strip_bytecounts->tdir_offset), SEEK_SET) < 0 ||
@@ -133,7 +157,7 @@ static uint64_t parse_strip_le(FILE *handle, const TIFFDirEntry *entry_strip_off
{
free(offsetp);
free(sizep);
- return -1;
+ return TIFF_ERROR;
}
for(i=0; i<nbr; i++)
{
@@ -146,6 +170,11 @@ static uint64_t parse_strip_le(FILE *handle, const TIFFDirEntry *entry_strip_off
return max_offset;
}
+/*@
+ @ requires type != 1 || \valid_read((const char *)val);
+ @ requires type != 3 || \valid_read((const char *)val + ( 0 .. 2));
+ @ requires type != 4 || \valid_read((const char *)val + ( 0 .. 4));
+ @*/
static unsigned int tiff_le_read(const void *val, const unsigned int type)
{
switch(type)
@@ -183,12 +212,13 @@ static uint64_t tiff_le_makernote(FILE *in, const uint32_t tiff_diroff)
uint64_t tile_bytecounts=0;
const TIFFDirEntry *entry;
if(tiff_diroff < sizeof(TIFFHeader))
- return -1;
+ return TIFF_ERROR;
if(fseek(in, tiff_diroff, SEEK_SET) < 0)
- return -1;
+ return TIFF_ERROR;
data_read=fread(buffer, 1, sizeof(buffer), in);
if(data_read<2)
- return -1;
+ return TIFF_ERROR;
+ /*@ assert 2 <= data_read <= sizeof(buffer); */
if( memcmp(buffer, sign_nikon1, sizeof(sign_nikon1))==0 ||
memcmp(buffer, sign_nikon2, sizeof(sign_nikon2))==0 ||
memcmp(buffer, sign_pentax, sizeof(sign_pentax))==0 )
@@ -199,10 +229,10 @@ static uint64_t tiff_le_makernote(FILE *in, const uint32_t tiff_diroff)
log_info("tiff_le_makernote(%lu) => %u entries\n", (long unsigned)tiff_diroff, n);
#endif
//sizeof(TIFFDirEntry)=12;
- if(n > (unsigned)(data_read-2)/12)
+ if(n > (unsigned int)(data_read-2)/12)
n=(data_read-2)/12;
if(n==0)
- return -1;
+ return TIFF_ERROR;
for(i=0;i<n;i++)
{
const uint64_t val=(uint64_t)le32(entry->tdir_count) * tiff_type2size(le16(entry->tdir_type));
@@ -221,7 +251,7 @@ static uint64_t tiff_le_makernote(FILE *in, const uint32_t tiff_diroff)
{
const uint64_t new_offset=le32(entry->tdir_offset)+val;
if(new_offset==0)
- return -1;
+ return TIFF_ERROR;
if(max_offset < new_offset)
max_offset=new_offset;
}
@@ -260,12 +290,11 @@ static uint64_t tiff_le_makernote(FILE *in, const uint32_t tiff_diroff)
}
#endif
-uint64_t header_check_tiff_le(file_recovery_t *fr, const uint32_t tiff_diroff, const unsigned int depth, const unsigned int count)
+uint64_t file_check_tiff_le(file_recovery_t *fr, const uint32_t tiff_diroff, const unsigned int depth, const unsigned int count)
{
unsigned char buffer[8192];
unsigned int i,n;
int data_read;
- const uint32_t *tiff_next_diroff;
uint64_t max_offset=0;
uint64_t alphaoffset=0;
uint64_t alphabytecount=0;
@@ -279,36 +308,47 @@ uint64_t header_check_tiff_le(file_recovery_t *fr, const uint32_t tiff_diroff, c
uint64_t tile_bytecounts=0;
unsigned int tdir_tag_old=0;
unsigned int sorted_tag_error=0;
- const TIFFDirEntry *entry=(const TIFFDirEntry *)&buffer[2];
+ const TIFFDirEntry *entries=(const TIFFDirEntry *)&buffer[2];
const TIFFDirEntry *entry_strip_offsets=NULL;
const TIFFDirEntry *entry_strip_bytecounts=NULL;
const TIFFDirEntry *entry_tile_offsets=NULL;
const TIFFDirEntry *entry_tile_bytecounts=NULL;
#ifdef DEBUG_TIFF
- log_info("header_check_tiff_le(fr, %lu, %u, %u)\n", (long unsigned)tiff_diroff, depth, count);
+ log_info("file_check_tiff_le(fr, %lu, %u, %u)\n", (long unsigned)tiff_diroff, depth, count);
#endif
if(depth>4)
- return -1;
+ return TIFF_ERROR;
if(count>16)
- return -1;
+ return TIFF_ERROR;
if(tiff_diroff < sizeof(TIFFHeader))
- return -1;
+ return TIFF_ERROR;
if(fseek(fr->handle, tiff_diroff, SEEK_SET) < 0)
- return -1;
+ return TIFF_ERROR;
data_read=fread(buffer, 1, sizeof(buffer), fr->handle);
+#if defined(__FRAMAC__)
+ data_read = Frama_C_interval(0, sizeof(buffer));
+ /*@ assert 0 <= data_read <= sizeof(buffer); */
+ Frama_C_make_unknown((char *)buffer, sizeof(buffer));
+#endif
if(data_read<2)
- return -1;
- n=buffer[0]+(buffer[1]<<8);
+ return TIFF_ERROR;
+ /*@ assert 2 <= data_read <= sizeof(buffer); */
+ n=buffer[0] | (buffer[1]<<8);
#ifdef DEBUG_TIFF
- log_info("header_check_tiff_le(fr, %lu, %u, %u) => %u entries\n", (long unsigned)tiff_diroff, depth, count, n);
+ log_info("file_check_tiff_le(fr, %lu, %u, %u) => %u entries\n", (long unsigned)tiff_diroff, depth, count, n);
#endif
- //sizeof(TIFFDirEntry)=12;
- if(n > (unsigned)(data_read-2)/12)
- n=(data_read-2)/12;
if(n==0)
- return -1;
- for(i=0;i<n;i++)
+ return TIFF_ERROR;
+ /*@ assert sizeof(TIFFDirEntry)==12; */
+ /*@
+ @ loop invariant 0 <= i <=n && i < (data_read-2)/12;
+ @ loop variant n-i;
+ @*/
+ for(i=0; i < n && i < (unsigned int)(data_read-2)/12; i++)
{
+ const TIFFDirEntry *entry=&entries[i];
+ /*@ assert 0 <= i < n; */
+ /*@ assert \valid_read(entry); */
const unsigned int tdir_tag=le16(entry->tdir_tag);
const uint64_t val=(uint64_t)le32(entry->tdir_count) * tiff_type2size(le16(entry->tdir_type));
#ifdef DEBUG_TIFF
@@ -324,16 +364,20 @@ uint64_t header_check_tiff_le(file_recovery_t *fr, const uint32_t tiff_diroff, c
(long unsigned)val);
#endif
if(tdir_tag_old > tdir_tag)
- { /* Entries must be sorted by tag, some SR2 file doesn't respected this rule */
- sorted_tag_error++;
- if(sorted_tag_error > 1 && strcmp(fr->extension,"sr2")!=0)
- return -1;
+ { /* Entries must be sorted by tag, some SR2 files don't respect this rule */
+ if(sorted_tag_error > 0)
+ {
+ if(strcmp(fr->extension,"sr2")!=0)
+ return TIFF_ERROR;
+ }
+ else
+ sorted_tag_error=1;
}
if(val>4)
{
const uint64_t new_offset=le32(entry->tdir_offset)+val;
if(new_offset==0)
- return -1;
+ return TIFF_ERROR;
if(max_offset < new_offset)
max_offset=new_offset;
}
@@ -355,9 +399,9 @@ uint64_t header_check_tiff_le(file_recovery_t *fr, const uint32_t tiff_diroff, c
case TIFFTAG_EXIFIFD:
case TIFFTAG_KODAKIFD:
{
- const uint64_t new_offset=header_check_tiff_le(fr, tmp, depth+1, 0);
- if(new_offset==-1)
- return -1;
+ const uint64_t new_offset=file_check_tiff_le(fr, tmp, depth+1, 0);
+ if(new_offset==TIFF_ERROR)
+ return TIFF_ERROR;
if(max_offset < new_offset)
max_offset=new_offset;
}
@@ -371,9 +415,9 @@ uint64_t header_check_tiff_le(file_recovery_t *fr, const uint32_t tiff_diroff, c
}
else
{
- const uint64_t new_offset=header_check_tiff_le(fr, tmp, depth+1, 0);
- if(new_offset==-1)
- return -1;
+ const uint64_t new_offset=file_check_tiff_le(fr, tmp, depth+1, 0);
+ if(new_offset==TIFF_ERROR)
+ return TIFF_ERROR;
if(max_offset < new_offset)
max_offset=new_offset;
}
@@ -382,8 +426,8 @@ uint64_t header_check_tiff_le(file_recovery_t *fr, const uint32_t tiff_diroff, c
case EXIFTAG_MAKERNOTE:
{
const uint64_t new_offset=tiff_le_makernote(fr->handle, tmp);
- if(new_offset==-1)
- return -1;
+ if(new_offset==TIFF_ERROR)
+ return TIFF_ERROR;
if(max_offset < new_offset)
max_offset=new_offset;
}
@@ -393,6 +437,7 @@ uint64_t header_check_tiff_le(file_recovery_t *fr, const uint32_t tiff_diroff, c
}
else if(le32(entry->tdir_count) > 1)
{
+ /*@ assert le32(entry->tdir_count) > 1; */
switch(tdir_tag)
{
case TIFFTAG_EXIFIFD:
@@ -401,30 +446,34 @@ uint64_t header_check_tiff_le(file_recovery_t *fr, const uint32_t tiff_diroff, c
if(le16(entry->tdir_type)==4)
{
const unsigned int nbr=(le32(entry->tdir_count)<32?le32(entry->tdir_count):32);
+ /*@ assert 2 <= nbr <= 32; */
+ uint32_t subifd_offsetp[32];
unsigned int j;
- uint32_t *subifd_offsetp;
if(fseek(fr->handle, le32(entry->tdir_offset), SEEK_SET) < 0)
{
- return -1;
+ return TIFF_ERROR;
}
- subifd_offsetp=(uint32_t *)MALLOC(nbr*sizeof(*subifd_offsetp));
- if(fread(subifd_offsetp, sizeof(*subifd_offsetp), nbr, fr->handle) != nbr)
+ if(fread(subifd_offsetp, sizeof(uint32_t), nbr, fr->handle) != nbr)
{
- free(subifd_offsetp);
- return -1;
+ return TIFF_ERROR;
}
+#if defined(__FRAMAC__)
+ Frama_C_make_unknown((char *)&subifd_offsetp, sizeof(subifd_offsetp));
+#endif
+ /*@
+ @ loop invariant 0 <= j <= nbr <=32;
+ @ loop variant nbr-j;
+ @*/
for(j=0; j<nbr; j++)
{
- const uint64_t new_offset=header_check_tiff_le(fr, le32(subifd_offsetp[j]), depth+1, 0);
- if(new_offset==-1)
+ const uint64_t new_offset=file_check_tiff_le(fr, le32(subifd_offsetp[j]), depth+1, 0);
+ if(new_offset==TIFF_ERROR)
{
- free(subifd_offsetp);
- return -1;
+ return TIFF_ERROR;
}
if(max_offset < new_offset)
max_offset = new_offset;
}
- free(subifd_offsetp);
}
break;
case TIFFTAG_STRIPOFFSETS:
@@ -442,7 +491,6 @@ uint64_t header_check_tiff_le(file_recovery_t *fr, const uint32_t tiff_diroff, c
}
}
tdir_tag_old=tdir_tag;
- entry++;
}
if(alphabytecount > 0 && max_offset < alphaoffset + alphabytecount)
max_offset = alphaoffset + alphabytecount;
@@ -459,32 +507,36 @@ uint64_t header_check_tiff_le(file_recovery_t *fr, const uint32_t tiff_diroff, c
if(entry_strip_offsets != NULL && entry_strip_bytecounts != NULL)
{
const uint64_t tmp=parse_strip_le(fr->handle, entry_strip_offsets, entry_strip_bytecounts);
- if(tmp==-1)
- return -1;
+ if(tmp==TIFF_ERROR)
+ return TIFF_ERROR;
if(max_offset < tmp)
max_offset=tmp;
}
if(entry_tile_offsets != NULL && entry_tile_bytecounts != NULL)
{
const uint64_t tmp=parse_strip_le(fr->handle, entry_tile_offsets, entry_tile_bytecounts);
- if(tmp==-1)
- return -1;
+ if(tmp==TIFF_ERROR)
+ return TIFF_ERROR;
if(max_offset < tmp)
max_offset=tmp;
}
- tiff_next_diroff=(const uint32_t *)entry;
- if(le32(*tiff_next_diroff) > 0)
+ if ( 2 + n*12 + 4 <= (unsigned int)data_read)
{
- const uint64_t new_offset=header_check_tiff_le(fr, le32(*tiff_next_diroff), depth+1, count+1);
- if(new_offset != -1 && max_offset < new_offset)
- max_offset=new_offset;
+ /*@ assert n <= (data_read - 6) /12; */
+ const uint32_t *tiff_next_diroff=(const uint32_t *)&entries[n];
+ if(le32(*tiff_next_diroff) > 0)
+ {
+ const uint64_t new_offset=file_check_tiff_le(fr, le32(*tiff_next_diroff), depth+1, count+1);
+ if(new_offset != TIFF_ERROR && max_offset < new_offset)
+ max_offset=new_offset;
+ }
}
return max_offset;
}
-int header_check_tiff_le_new(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new)
+int header_check_tiff_le(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new)
{
- const char raf_fp[15]={0x49, 0x49, 0x2a, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xf0, 0x0d, 0x00, 0x01};
+ const unsigned char raf_fp[15]={0x49, 0x49, 0x2a, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xf0, 0x0d, 0x00, 0x01};
const char *potential_error=NULL;
const TIFFHeader *header=(const TIFFHeader *)buffer;
if((uint32_t)le32(header->tiff_diroff) < sizeof(TIFFHeader))
@@ -526,7 +578,7 @@ int header_check_tiff_le_new(const unsigned char *buffer, const unsigned int buf
file_recovery_new->extension="sr2";
else if(strncmp(tag_make, "SONY ",5)==0)
file_recovery_new->extension="arw";
- else if(memcmp(tag_make, "NIKON CORPORATION", 18)==0)
+ else if(tag_make < (const char *)buffer + buffer_size - 18 && memcmp(tag_make, "NIKON CORPORATION", 18)==0)
file_recovery_new->extension="nef";
}
}
diff --git a/src/file_txt.c b/src/file_txt.c
index f1e7336..19ea286 100644
--- a/src/file_txt.c
+++ b/src/file_txt.c
@@ -33,6 +33,7 @@
#include <time.h>
#endif
#include <ctype.h> /* tolower */
+#include <assert.h>
#include <stdio.h>
#include "types.h"
#include "common.h"
@@ -118,6 +119,11 @@ static const txt_header_t fasttxt_headers[] = {
{ "#! /bin/bash", 12, "sh"},
{ "#! /bin/ksh", 11, "sh"},
{ "#! /bin/sh", 10, "sh"},
+ { "#!/usr/bin/env groovy", 21, "groovy"},
+ { "#!/usr/bin/env perl", 19, "pl"},
+ { "#!/usr/bin/env php", 18, "php"},
+ { "#!/usr/bin/env python", 21, "py"},
+ { "#!/usr/bin/env ruby", 19, "rb"},
/* Opera Hotlist bookmark/contact list/notes */
{ "Opera Hotlist version 2.0", 25, "adr"},
/* Microsoft VB Class module */
@@ -771,10 +777,31 @@ static data_check_t data_check_xml_utf8(const unsigned char *buffer, const unsig
static int header_check_xml_utf8(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new)
{
+ const char *tmp;
+ /* buffer may not be null-terminated */
+ char *buf=(char *)MALLOC(buffer_size+1);
+ memcpy(buf, buffer, buffer_size);
+ buf[buffer_size]='\0';
reset_file_recovery(file_recovery_new);
file_recovery_new->data_check=&data_check_xml_utf8;
- file_recovery_new->extension="xml";
+ file_recovery_new->extension=NULL;
+ tmp=strchr(buf,'<');
+ while(tmp!=NULL && file_recovery_new->extension==NULL)
+ {
+ if(strncasecmp(tmp, "<Archive name=\"Root\">", 8)==0)
+ {
+ /* Grasshopper archive */
+ file_recovery_new->extension="ghx";
+ }
+ tmp++;
+ tmp=strchr(tmp,'<');
+ }
+ if(file_recovery_new->extension==NULL)
+ {
+ file_recovery_new->extension="xml";
+ }
file_recovery_new->file_check=&file_check_xml;
+ free(buf);
return 1;
}
@@ -1090,7 +1117,7 @@ static int header_check_txt(const unsigned char *buffer, const unsigned int buff
reset_file_recovery(file_recovery_new);
file_recovery_new->data_check=&data_check_txt;
file_recovery_new->file_check=&file_check_size;
- /* Dos/Windows bath */
+ /* Dos/Windows batch */
file_recovery_new->extension="bat";
return 1;
}
@@ -1135,6 +1162,15 @@ static int header_check_txt(const unsigned char *buffer, const unsigned int buff
res=(const unsigned char *)memchr(haystack,'\n',ll);
if(res!=NULL)
ll=res-haystack;
+ if(td_memmem(haystack, ll, "groovy", 6) != NULL)
+ {
+ reset_file_recovery(file_recovery_new);
+ file_recovery_new->data_check=&data_check_txt;
+ file_recovery_new->file_check=&file_check_size;
+ /* Groovy script */
+ file_recovery_new->extension="groovy";
+ return 1;
+ }
if(td_memmem(haystack, ll, "perl", 4) != NULL)
{
reset_file_recovery(file_recovery_new);
@@ -1144,6 +1180,15 @@ static int header_check_txt(const unsigned char *buffer, const unsigned int buff
file_recovery_new->extension="pl";
return 1;
}
+ if(td_memmem(haystack, ll, "php", 3) != NULL)
+ {
+ reset_file_recovery(file_recovery_new);
+ file_recovery_new->data_check=&data_check_txt;
+ file_recovery_new->file_check=&file_check_size;
+ /* PHP script */
+ file_recovery_new->extension="php";
+ return 1;
+ }
if(td_memmem(haystack, ll, "python", 6) != NULL)
{
reset_file_recovery(file_recovery_new);
@@ -1209,7 +1254,7 @@ static int header_check_txt(const unsigned char *buffer, const unsigned int buff
reset_file_recovery(file_recovery_new);
file_recovery_new->data_check=&data_check_txt;
file_recovery_new->file_check=&file_check_size;
- /* Dos/Windows bath */
+ /* Dos/Windows batch */
file_recovery_new->extension="bat";
return 1;
}
@@ -1470,6 +1515,7 @@ static void register_header_check_fasttxt(file_stat_t *file_stat)
const txt_header_t *header=&fasttxt_headers[0];
while(header->len > 0)
{
+ assert(strlen(header->string) == header->len);
register_header_check(0, header->string, header->len, &header_check_fasttxt, file_stat);
header++;
}
diff --git a/src/file_x3f.c b/src/file_x3f.c
index 896ac1a..0cba13f 100644
--- a/src/file_x3f.c
+++ b/src/file_x3f.c
@@ -31,6 +31,7 @@
#include "filegen.h"
#include "common.h"
+extern const file_hint_t file_hint_x3i;
static void register_header_check_x3f(file_stat_t *file_stat);
static int header_check_x3f(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new);
@@ -63,8 +64,15 @@ static int header_check_x3f(const unsigned char *buffer, const unsigned int buff
return 0;
if(rotation!=0 && rotation!=90 && rotation!=180 && rotation!=270)
return 0;
+ if(file_recovery->file_stat!=NULL &&
+ file_recovery->file_stat->file_hint==&file_hint_x3i &&
+ safe_header_only==0)
+ {
+ return 0;
+ }
reset_file_recovery(file_recovery_new);
file_recovery_new->extension=file_hint_x3f.extension;
+ file_recovery_new->min_filesize=1024;
return 1;
}
diff --git a/src/file_x3i.c b/src/file_x3i.c
index b4b9b93..c1a001f 100644
--- a/src/file_x3i.c
+++ b/src/file_x3i.c
@@ -45,6 +45,7 @@ static int header_check_x3i(const unsigned char *buffer, const unsigned int buff
{
reset_file_recovery(file_recovery_new);
file_recovery_new->extension=file_hint_x3i.extension;
+ file_recovery_new->min_filesize=1024;
return 1;
}
diff --git a/src/file_zip.c b/src/file_zip.c
index ab25947..5d74cbd 100644
--- a/src/file_zip.c
+++ b/src/file_zip.c
@@ -307,6 +307,9 @@ static int zip_parse_file_entry(file_recovery_t *fr, const char **ext, const uns
/* SMART Notebook */
else if(len==15 && memcmp(filename, "imsmanifest.xml", 15)==0)
*ext="notebook";
+ /* Apple Numbers */
+ else if(len==18 && memcmp(filename, "Index/Document.iwa", 18)==0)
+ *ext="numbers";
else if(len==19 && memcmp(filename, "AndroidManifest.xml", 19)==0)
*ext="apk";
else if(len==30 && memcmp(filename, "xsd/MindManagerApplication.xsd", 30)==0)
diff --git a/src/filegen.c b/src/filegen.c
index f48f21d..63a27d6 100644
--- a/src/filegen.c
+++ b/src/filegen.c
@@ -98,12 +98,12 @@ void register_header_check(const unsigned int offset, const void *value, const u
static void index_header_check_aux(file_check_t *file_check_new)
{
- struct td_list_head *tmp;
- td_list_for_each(tmp, &file_check_list.list)
+ if(file_check_new->length>0)
{
- file_check_list_t *pos=td_list_entry(tmp, file_check_list_t, list);
- if(file_check_new->length>0)
+ struct td_list_head *tmp;
+ td_list_for_each(tmp, &file_check_list.list)
{
+ file_check_list_t *pos=td_list_entry(tmp, file_check_list_t, list);
if(pos->offset >= file_check_new->offset &&
pos->offset < file_check_new->offset+file_check_new->length)
{
@@ -597,6 +597,12 @@ int file_rename_unicode(file_recovery_t *file_recovery, const void *buffer, cons
static uint64_t offset_skipped_header=0;
+void header_ignored_cond_reset(uint64_t start, uint64_t end)
+{
+ if(start <= offset_skipped_header && offset_skipped_header <= end)
+ offset_skipped_header=0;
+}
+
/* 0: file_recovery is bad *
* 1: file_recovery is ok */
int header_ignored_adv(const file_recovery_t *file_recovery, const file_recovery_t *file_recovery_new)
@@ -613,7 +619,9 @@ int header_ignored_adv(const file_recovery_t *file_recovery, const file_recovery
if(file_recovery->handle==NULL)
{
if(file_recovery_new->location.start==0 || offset_skipped_header==0)
+ {
offset_skipped_header=file_recovery_new->location.start;
+ }
return 0;
}
@@ -626,15 +634,17 @@ int header_ignored_adv(const file_recovery_t *file_recovery, const file_recovery
#endif
assert(offset >= 0);
file_recovery->file_check(&fr_test);
- if(fr_test.file_size>0)
- return 1;
if(my_fseek(file_recovery->handle, offset, SEEK_SET) < 0)
{
log_error("BUG in header_ignored_adv: my_fseek() failed\n");
return 1;
}
+ if(fr_test.file_size>0)
+ return 1;
if(file_recovery_new->location.start==0 || offset_skipped_header==0)
+ {
offset_skipped_header=file_recovery_new->location.start;
+ }
return 0;
}
diff --git a/src/filegen.h b/src/filegen.h
index af8e793..352a15e 100644
--- a/src/filegen.h
+++ b/src/filegen.h
@@ -135,6 +135,7 @@ void register_header_check(const unsigned int offset, const void *value, const u
file_stat_t * init_file_stats(file_enable_t *files_enable);
int file_rename(file_recovery_t *file_recovery, const void *buffer, const int buffer_size, const int offset, const char *new_ext, const int force_ext);
int file_rename_unicode(file_recovery_t *file_recovery, const void *buffer, const int buffer_size, const int offset, const char *new_ext, const int force_ext);
+void header_ignored_cond_reset(uint64_t start, uint64_t end);
void header_ignored(const file_recovery_t *file_recovery_new);
int header_ignored_adv(const file_recovery_t *file_recovery, const file_recovery_t *file_recovery_new);
int my_fseek(FILE *stream, off_t offset, int whence);
diff --git a/src/godmode.c b/src/godmode.c
index ca3d333..0b41b0e 100644
--- a/src/godmode.c
+++ b/src/godmode.c
@@ -602,7 +602,7 @@ static list_part_t *search_part(disk_t *disk_car, const list_part_t *list_part_o
old_cylinder=start.cylinder;
wmove(stdscr,ANALYSE_Y,ANALYSE_X);
wclrtoeol(stdscr);
- wprintw(stdscr,"Analyse cylinder %5u/%u: %02u%%",
+ wprintw(stdscr, "Analyse cylinder %5lu/%lu: %02u%%",
start.cylinder, disk_car->geom.cylinders-1,
(unsigned int)(search_location*100/disk_car->disk_size));
wrefresh(stdscr);
@@ -846,7 +846,7 @@ static list_part_t *search_part(disk_t *disk_car, const list_part_t *list_part_o
#ifdef HAVE_NCURSES
wmove(stdscr,ANALYSE_Y+1,ANALYSE_X);
wclrtoeol(stdscr);
- wprintw(stdscr,msg_READ_ERROR_AT, start.cylinder,start.head,start.sector,(unsigned long)(partition->part_offset/disk_car->sector_size));
+ wprintw(stdscr, "Read error at %lu/%u/%u (lba=%lu)\n", start.cylinder,start.head,start.sector,(unsigned long)(partition->part_offset/disk_car->sector_size));
#endif
/* Stop reading after the end of the disk */
if(search_location >= disk_car->disk_real_size)
diff --git a/src/icon_ph.rc b/src/icon_ph.rc
index 4987614..d65fe73 100644
--- a/src/icon_ph.rc
+++ b/src/icon_ph.rc
@@ -4,8 +4,8 @@ app ICON DISCARDABLE "../icons/photorec.ico"
1 24 "../win/photorec_win.exe.manifest"
1 VERSIONINFO
-FILEVERSION 7, 1, 0, 0
-PRODUCTVERSION 7, 1, 0, 0
+FILEVERSION 7, 2, 0, 0
+PRODUCTVERSION 7, 2, 0, 0
FILEFLAGSMASK 0x3f
FILEOS 0x4
FILETYPE 0x1
@@ -20,9 +20,9 @@ BEGIN
VALUE "InternalName", "PhotoRec"
VALUE "OriginalFilename", "photorec_win.exe"
VALUE "Comments", "Signature based file recovery utility"
- VALUE "FileVersion", "7.1"
- VALUE "ProductVersion", "7.1"
- VALUE "LegalCopyright", "Copyright (C) 1998-2015 Christophe GRENIER, et al."
+ VALUE "FileVersion", "7.2"
+ VALUE "ProductVersion", "7.2"
+ VALUE "LegalCopyright", "Copyright (C) 1998-2019 Christophe GRENIER, et al."
END
END
BLOCK "VarFileInfo"
diff --git a/src/icon_qph.rc b/src/icon_qph.rc
index 391828e..057ff52 100644
--- a/src/icon_qph.rc
+++ b/src/icon_qph.rc
@@ -4,8 +4,8 @@ app ICON DISCARDABLE "../icons/photorec.ico"
1 24 "../win/qphotorec_win.exe.manifest"
1 VERSIONINFO
-FILEVERSION 7, 1, 0, 0
-PRODUCTVERSION 7, 1, 0, 0
+FILEVERSION 7, 2, 0, 0
+PRODUCTVERSION 7, 2, 0, 0
FILEFLAGSMASK 0x3f
FILEOS 0x4
FILETYPE 0x1
@@ -20,9 +20,9 @@ BEGIN
VALUE "InternalName", "PhotoRec"
VALUE "OriginalFilename", "qphotorec_win.exe"
VALUE "Comments", "Signature based file recovery utility"
- VALUE "FileVersion", "7.1"
- VALUE "ProductVersion", "7.1"
- VALUE "LegalCopyright", "Copyright (C) 1998-2015 Christophe GRENIER, et al."
+ VALUE "FileVersion", "7.2"
+ VALUE "ProductVersion", "7.2"
+ VALUE "LegalCopyright", "Copyright (C) 1998-2019 Christophe GRENIER, et al."
END
END
BLOCK "VarFileInfo"
diff --git a/src/icon_tst.rc b/src/icon_tst.rc
index 67b041d..63d5da3 100644
--- a/src/icon_tst.rc
+++ b/src/icon_tst.rc
@@ -4,8 +4,8 @@ app ICON DISCARDABLE "../icons/testdisk.ico"
1 24 MOVEABLE PURE "../win/testdisk_win.exe.manifest"
1 VERSIONINFO
-FILEVERSION 7, 1, 0, 0
-PRODUCTVERSION 7, 1, 0, 0
+FILEVERSION 7, 2, 0, 0
+PRODUCTVERSION 7, 2, 0, 0
FILEFLAGSMASK 0x3f
FILEOS 0x4
FILETYPE 0x1
@@ -20,9 +20,9 @@ BEGIN
VALUE "InternalName", "TestDisk"
VALUE "OriginalFilename", "testdisk_win.exe"
VALUE "Comments", "Partition and file recovery utility"
- VALUE "FileVersion", "7.1"
- VALUE "ProductVersion", "7.1"
- VALUE "LegalCopyright", "Copyright (C) 1998-2015 Christophe GRENIER, et al."
+ VALUE "FileVersion", "7.2"
+ VALUE "ProductVersion", "7.2"
+ VALUE "LegalCopyright", "Copyright (C) 1998-2019 Christophe GRENIER, et al."
END
END
BLOCK "VarFileInfo"
diff --git a/src/lang.h b/src/lang.h
index f20dce7..3f43d48 100644
--- a/src/lang.h
+++ b/src/lang.h
@@ -21,7 +21,6 @@
*/
#define msg_DUMP_HEXA "Dump Hexa\n"
-#define msg_READ_ERROR_AT "Read error at %u/%u/%u (lba=%lu)\n"
#define c_YES 'Y'
#define c_NO 'N'
#define msg_TBL_NMARK "\nPartition sector doesn't have the endmark 0xAA55\n"
diff --git a/src/lang/qphotorec.ca.ts b/src/lang/qphotorec.ca.ts
index dbdcd5c..1e26ea8 100644
--- a/src/lang/qphotorec.ca.ts
+++ b/src/lang/qphotorec.ca.ts
@@ -8,7 +8,7 @@
</message>
<message>
<location filename="src/qphotorec.cpp" line="156"/>
- <location filename="src/qphotorec.cpp" line="518"/>
+ <location filename="src/qphotorec.cpp" line="521"/>
<source>Please select a destination to save the recovered files to.</source>
<translation>Seleccioneu la destinació on guardar els fitxers recuperats.</translation>
</message>
@@ -61,22 +61,22 @@ Heu de ser usuari root per utilitzar el PhotoRec.</translation>
<translation>No hi ha disc</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="452"/>
+ <location filename="src/qphotorec.cpp" line="455"/>
<source>Add a raw disk image...</source>
<translation>Afegeix una imatge de disc en brut...</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="458"/>
+ <location filename="src/qphotorec.cpp" line="461"/>
<source>PhotoRec is free software, and comes with ABSOLUTELY NO WARRANTY.</source>
<translation>El PhotoRec és programari lliure i ve SENSE CAP TIPUS DE GARANTIA.</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="459"/>
+ <location filename="src/qphotorec.cpp" line="462"/>
<source>Please select a media to recover from</source>
<translation>Seleccioneu un mitjà des d&apos;on recuperar</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="462"/>
+ <location filename="src/qphotorec.cpp" line="465"/>
<source>Disk capacity must be correctly detected for a successful recovery.
If a disk listed above has an incorrect size, check HD jumper settings and BIOS
detection, and install the latest OS patches and disk drivers.</source>
@@ -85,143 +85,143 @@ Si algun dels discs llistats a sobre té una mida incorrecta, comproveu la confi
detecció a la BIOS, i instal·leu la última versió dels controladors del disc.</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="469"/>
+ <location filename="src/qphotorec.cpp" line="472"/>
<source>Flags</source>
<translation>Indicadors</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="470"/>
+ <location filename="src/qphotorec.cpp" line="473"/>
<source>Type</source>
<translation>Tipus</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="471"/>
+ <location filename="src/qphotorec.cpp" line="474"/>
<source>File System</source>
<translation>Sistema de fitxers</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="472"/>
+ <location filename="src/qphotorec.cpp" line="475"/>
<source>Size</source>
<translation>Mida</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="473"/>
+ <location filename="src/qphotorec.cpp" line="476"/>
<source>Label</source>
<translation>Etiqueta</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="488"/>
+ <location filename="src/qphotorec.cpp" line="491"/>
<source>File System type</source>
<translation>Tipus de sistema de fitxers</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="489"/>
+ <location filename="src/qphotorec.cpp" line="492"/>
<source>ext2/ext3/ext4 filesystem</source>
<translation>sistema de fitxers ext2/ext3/ext4 </translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="490"/>
+ <location filename="src/qphotorec.cpp" line="493"/>
<source>FAT/NTFS/HFS+/ReiserFS/...</source>
<translation>FAT/NTFS/HFS+/ReiserFS/...</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="494"/>
+ <location filename="src/qphotorec.cpp" line="497"/>
<source>Free: Scan for file from unallocated space only</source>
<translation>Lliure: Explora només l&apos;espai no assignat</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="495"/>
+ <location filename="src/qphotorec.cpp" line="498"/>
<source>Whole: Extract files from whole partition</source>
<translation>Sencer: Extreu fitxers de la partició sencera</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="522"/>
+ <location filename="src/qphotorec.cpp" line="525"/>
<source>&amp;Browse</source>
<translation>&amp;Navega</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="538"/>
+ <location filename="src/qphotorec.cpp" line="541"/>
<source>&amp;Search</source>
<translation>&amp;Cerca</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="541"/>
+ <location filename="src/qphotorec.cpp" line="544"/>
<source>&amp;About</source>
<translation>&amp;Quant a</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="542"/>
+ <location filename="src/qphotorec.cpp" line="545"/>
<source>&amp;File Formats</source>
<translation>&amp;Format dels fitxers</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="642"/>
+ <location filename="src/qphotorec.cpp" line="645"/>
<source>Destination:</source>
<translation>Destinació:</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="647"/>
+ <location filename="src/qphotorec.cpp" line="650"/>
<source>Recovery completed</source>
<translation>Recuperació completada</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="652"/>
+ <location filename="src/qphotorec.cpp" line="655"/>
<source>Bruteforce %1 sectors remaining (test %2)</source>
<translation>Força bruta %1 sectors restants (test %2)</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="660"/>
+ <location filename="src/qphotorec.cpp" line="663"/>
<source>Pass %1 - Reading sector %2/%3</source>
<translation>Passa %1 - Llegint sector %2/%3</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="665"/>
+ <location filename="src/qphotorec.cpp" line="668"/>
<source>%1/10 headers found</source>
<translation>%1/10 capçaleres trobades</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="667"/>
+ <location filename="src/qphotorec.cpp" line="670"/>
<source>%1 files found</source>
<translation>%1 fitxers trobats</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="540"/>
- <location filename="src/qphotorec.cpp" line="762"/>
- <source>&amp;Quit</source>
- <translation>&amp;Surt</translation>
- </message>
- <message>
- <location filename="src/qphotorec.cpp" line="750"/>
+ <location filename="src/qphotorec.cpp" line="753"/>
<source>File family</source>
<translation>Família de fitxers</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="751"/>
+ <location filename="src/qphotorec.cpp" line="543"/>
+ <location filename="src/qphotorec.cpp" line="765"/>
+ <source>&amp;Quit</source>
+ <translation>&amp;Surt</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="754"/>
<source>Number of files recovered</source>
<translation>Nombre de fitxers recuperats</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="834"/>
+ <location filename="src/qphotorec.cpp" line="837"/>
<source>QPhotoRec: Failed to create file!</source>
<translation>QPhotoRec: No s&apos;ha pogut crear el fitxer</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="835"/>
+ <location filename="src/qphotorec.cpp" line="838"/>
<source>Failed to create file! Please choose another destination</source>
<translation>No s&apos;ha pogut crear el fitxer. Trieu una altra destinació</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="854"/>
+ <location filename="src/qphotorec.cpp" line="857"/>
<source>QPhotoRec: Not enough space!</source>
<translation>QPhotoRec: No hi ha espai suficient</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="855"/>
+ <location filename="src/qphotorec.cpp" line="858"/>
<source>There is not enough space left! Please free disk space and/or choose another destination</source>
<translation>No hi ha prou espai disponible. Heu d&apos;alliberar espai de disc i/o escollir una altra destinació</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="924"/>
+ <location filename="src/qphotorec.cpp" line="927"/>
<source>QPhotoRec is is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
QPhotoRec is is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
@@ -234,25 +234,25 @@ El QPhotoRec es distribueix amb l&apos;esperança que serà útil, però SENSE C
Hauríeu d&apos;haver rebut una còpia de la Llicència Pública General GNU juntament amb el QPhotoRec. En cas contrari, consulteu &lt;http://www.gnu.org/licenses/&gt;.</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="925"/>
+ <location filename="src/qphotorec.cpp" line="928"/>
<source>QPhotoRec: About</source>
<translation>QPhotoRec: Quant a</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="954"/>
+ <location filename="src/qphotorec.cpp" line="957"/>
<source>File Formats</source>
<translation>Formats de fitxer</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="957"/>
+ <location filename="src/qphotorec.cpp" line="960"/>
<source>&amp;Reset</source>
<translation>&amp;Reinicialitzar</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="958"/>
+ <location filename="src/qphotorec.cpp" line="961"/>
<source>Res&amp;tore</source>
<translation>
Res&amp;taura</translation>
</message>
</context>
-</TS>
+</TS> \ No newline at end of file
diff --git a/src/lang/qphotorec.cs.ts b/src/lang/qphotorec.cs.ts
new file mode 100644
index 0000000..57c630e
--- /dev/null
+++ b/src/lang/qphotorec.cs.ts
@@ -0,0 +1,256 @@
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="cs" version="2.1">
+<context>
+ <name>QPhotorec</name>
+ <message>
+ <location filename="src/qphotorec.cpp" line="125"/>
+ <source>QPhotoRec</source>
+ <translation>QPhotoRec</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="156"/>
+ <location filename="src/qphotorec.cpp" line="521"/>
+ <source>Please select a destination to save the recovered files to.</source>
+ <translation>Vyberte umístění do kterého ukládat obnovené soubory.</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="170"/>
+ <source>Please select a raw file</source>
+ <translation>Vyberte soubor s daty pro zpracování</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="172"/>
+ <source>Raw Files (*.dd *.raw *.img)</source>
+ <translation>Soubory s daty pro zpracování (*.dd *.raw *.img)</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="259"/>
+ <source>Sys=</source>
+ <translation>Sys=</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="261"/>
+ <source>Unknown</source>
+ <translation>Neznámé</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="377"/>
+ <source>No harddisk found</source>
+ <translation>Nenalezeno žádné datové úložiště</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="379"/>
+ <source>No harddisk found
+You need to be administrator to use this program.
+Under Win9x, use the DOS version instead.
+Under Vista or later, select this program, right-click and choose &quot;Run as administrator&quot;.</source>
+ <translation>Nenalezen žádný pevný disk
+Tento program je třeba spouštět s oprávněními pro správu systému.
+V systému Windows 9x použijte namísto toho verzi pro DOS.
+Pro Vista a novější vyberte tento program, klikněte na něj pravým tlačítkem a zvolte „Spustit jako správce“.</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="388"/>
+ <source>No harddisk found
+You need to be root to use PhotoRec.</source>
+ <translation>Nenalezen žádný pevný disk
+PhotoRec je třeba spouštět s oprávněními pro správu systému.</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="393"/>
+ <source>No Disk!</source>
+ <translation>Žádné datové úložiště!</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="455"/>
+ <source>Add a raw disk image...</source>
+ <translation>Přidat obraz disku pro zpracování…</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="461"/>
+ <source>PhotoRec is free software, and comes with ABSOLUTELY NO WARRANTY.</source>
+ <translation>PhotoRec je svobodný (libre) software a NEJSOU NA NĚJ POSKYTOVÁNY ŽÁDNÉ ZÁRUKY.</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="462"/>
+ <source>Please select a media to recover from</source>
+ <translation>Vyberte médium ze kterého obnovit</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="465"/>
+ <source>Disk capacity must be correctly detected for a successful recovery.
+If a disk listed above has an incorrect size, check HD jumper settings and BIOS
+detection, and install the latest OS patches and disk drivers.</source>
+ <translation>Pro úspěšné obnovení je třeba, aby byla správně zjištěna velikost datového úložiště.
+Pokud má výše uvedený disk nesprávnou velikost, zkontrolujte pozici příslušné zkratovací propojky (jumper) a detekci v BIOS a nainstalujte nejnovější opravy pro operační systém a ovladače disků. </translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="472"/>
+ <source>Flags</source>
+ <translation>Příznaky</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="473"/>
+ <source>Type</source>
+ <translation>Typ</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="474"/>
+ <source>File System</source>
+ <translation>Souborový systém</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="475"/>
+ <source>Size</source>
+ <translation>Velikost</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="476"/>
+ <source>Label</source>
+ <translation>Štítek</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="491"/>
+ <source>File System type</source>
+ <translation>Typ souborového systému</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="492"/>
+ <source>ext2/ext3/ext4 filesystem</source>
+ <translation>Souborový systém ext2/ext3/ext4</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="493"/>
+ <source>FAT/NTFS/HFS+/ReiserFS/...</source>
+ <translation>FAT/NTFS/HFS+/ReiserFS/…</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="497"/>
+ <source>Free: Scan for file from unallocated space only</source>
+ <translation>Volné: hledat soubory pouze na nepřiděleném prostoru</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="498"/>
+ <source>Whole: Extract files from whole partition</source>
+ <translation>Celé: vytáhnout soubory z celého oddílu</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="525"/>
+ <source>&amp;Browse</source>
+ <translation>&amp;Procházet</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="541"/>
+ <source>&amp;Search</source>
+ <translation>&amp;Hledat</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="544"/>
+ <source>&amp;About</source>
+ <translation>O &amp;aplikaci</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="545"/>
+ <source>&amp;File Formats</source>
+ <translation>Souborové &amp;formáty</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="645"/>
+ <source>Destination:</source>
+ <translation>Cíl:</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="650"/>
+ <source>Recovery completed</source>
+ <translation>Obnovení dokončeno</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="655"/>
+ <source>Bruteforce %1 sectors remaining (test %2)</source>
+ <translation>Zbývá %1 sektorů pro zkoušení hrubou silou (test %2)</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="663"/>
+ <source>Pass %1 - Reading sector %2/%3</source>
+ <translation>Průchod %1 – čtení sektoru %2/%3</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="668"/>
+ <source>%1/10 headers found</source>
+ <translation>Nalezeno %1/10 hlaviček</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="670"/>
+ <source>%1 files found</source>
+ <translation>Nalezeno %1 souborů</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="753"/>
+ <source>File family</source>
+ <translation>Kategorie souborů</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="543"/>
+ <location filename="src/qphotorec.cpp" line="765"/>
+ <source>&amp;Quit</source>
+ <translation>&amp;Ukončit</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="754"/>
+ <source>Number of files recovered</source>
+ <translation>Počet obnovených souborů</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="837"/>
+ <source>QPhotoRec: Failed to create file!</source>
+ <translation>QPhotoRec: Nepodařilo se vytvořit soubor!</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="838"/>
+ <source>Failed to create file! Please choose another destination</source>
+ <translation>Soubor se nepodařilo vytvořit! Zvolte jiný cíl</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="857"/>
+ <source>QPhotoRec: Not enough space!</source>
+ <translation>QPhotoRec: Nedostatek dostupného prostoru!</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="858"/>
+ <source>There is not enough space left! Please free disk space and/or choose another destination</source>
+ <translation>Nezbývá dostatek volného prostoru! Uvolněte nějaký a/nebo zvolte jiný cíl</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="927"/>
+ <source>QPhotoRec is is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
+
+QPhotoRec is is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with QPhotoRec. If not, see &lt;http://www.gnu.org/licenses/&gt;.</source>
+ <translation>QPhotoRec je svobodný (libre) software: můžete ho šířit a/nebo upravovat za podmínek licence GNU General Public License, vydané nadací Free Software Foundation, buď verze 2 této licence, nebo (dle své volby) libovolné novější.
+
+QPhotoRec je šířen v naději, že bude užitečný, ale BEZ JAKÝCHKOLI ZÁRUK; dokonce bez předpokládané záruky PRODEJNOSTI nebo VHODNOSTI PRO KONKRÉTNÍ ÚČEL. Podrobnosti viz text GNU General Public License.
+
+Společně s QPhotoRec byste měli obdržet text znění GNU General Public License. Pokud ne, naleznete ho na &lt;http://www.gnu.org/licenses/&gt;.</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="928"/>
+ <source>QPhotoRec: About</source>
+ <translation>QPhotoRec: O aplikaci</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="957"/>
+ <source>File Formats</source>
+ <translation>Souborové formáty</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="960"/>
+ <source>&amp;Reset</source>
+ <translation>V&amp;rátit na výchozí</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="961"/>
+ <source>Res&amp;tore</source>
+ <translation>Obnovi&amp;t</translation>
+ </message>
+</context>
+</TS> \ No newline at end of file
diff --git a/src/lang/qphotorec.es.ts b/src/lang/qphotorec.es.ts
index d82bf94..3f35b77 100644
--- a/src/lang/qphotorec.es.ts
+++ b/src/lang/qphotorec.es.ts
@@ -8,7 +8,7 @@
</message>
<message>
<location filename="src/qphotorec.cpp" line="156"/>
- <location filename="src/qphotorec.cpp" line="518"/>
+ <location filename="src/qphotorec.cpp" line="521"/>
<source>Please select a destination to save the recovered files to.</source>
<translation>Por favor escoje un directorio para grabar los archivos recuperados.</translation>
</message>
@@ -43,13 +43,16 @@
You need to be administrator to use this program.
Under Win9x, use the DOS version instead.
Under Vista or later, select this program, right-click and choose &quot;Run as administrator&quot;.</source>
- <translation type="unfinished"/>
+ <translation>No se encontró ningún disco duro
+Necesitas ser Administrador par usar este programa
+Si estas en Win9x, usa la versión DOS
+Si estas en Vista o posterior, botón derecho y selecciona &quot;Ejecutar como Administrador&quot;</translation>
</message>
<message>
<location filename="src/qphotorec.cpp" line="388"/>
<source>No harddisk found
You need to be root to use PhotoRec.</source>
- <translation>No se pudo encontrar los discos duros
+ <translation>No se pudo encontrar ningún disco duro
Necesitas ser root para usar PhotoRec.</translation>
</message>
<message>
@@ -58,189 +61,195 @@ Necesitas ser root para usar PhotoRec.</translation>
<translation>Sin disco</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="452"/>
+ <location filename="src/qphotorec.cpp" line="455"/>
<source>Add a raw disk image...</source>
- <translation>Añade imagen de disco raw</translation>
+ <translation>Añade un imagen raw de disco</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="458"/>
+ <location filename="src/qphotorec.cpp" line="461"/>
<source>PhotoRec is free software, and comes with ABSOLUTELY NO WARRANTY.</source>
- <translation>Photorec es un program gatis y no TIENE NINGUNA GARANTIA.</translation>
+ <translation>Photorec es un program gratuito y no TIENE NINGUNA GARANTIA.</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="459"/>
+ <location filename="src/qphotorec.cpp" line="462"/>
<source>Please select a media to recover from</source>
<translation>Por favor escoje un medio para recuperarse de </translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="462"/>
+ <location filename="src/qphotorec.cpp" line="465"/>
<source>Disk capacity must be correctly detected for a successful recovery.
If a disk listed above has an incorrect size, check HD jumper settings and BIOS
detection, and install the latest OS patches and disk drivers.</source>
- <translation type="unfinished"/>
+ <translation>El tamaño del disco debe ser correctamente detectado
+Si el tamaño de alguno de los disco listados es incorrecto, comprueba la Bios
+y los jumpers y/o Instala los los controladadores más recientes</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="469"/>
+ <location filename="src/qphotorec.cpp" line="472"/>
<source>Flags</source>
<translation>Bandera</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="470"/>
+ <location filename="src/qphotorec.cpp" line="473"/>
<source>Type</source>
<translation>Tipo</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="471"/>
+ <location filename="src/qphotorec.cpp" line="474"/>
<source>File System</source>
<translation>Sistem de archivos</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="472"/>
+ <location filename="src/qphotorec.cpp" line="475"/>
<source>Size</source>
- <translation>tamaño</translation>
+ <translation>Tamaño</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="473"/>
+ <location filename="src/qphotorec.cpp" line="476"/>
<source>Label</source>
<translation>Etiqueta</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="488"/>
+ <location filename="src/qphotorec.cpp" line="491"/>
<source>File System type</source>
<translation>Tipo de sistema de archivo </translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="489"/>
+ <location filename="src/qphotorec.cpp" line="492"/>
<source>ext2/ext3/ext4 filesystem</source>
<translation>sistema de archivos ext2/ext3/ext4</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="490"/>
+ <location filename="src/qphotorec.cpp" line="493"/>
<source>FAT/NTFS/HFS+/ReiserFS/...</source>
<translation>FAT/NTFS/HFS+/ReiserFS/...</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="494"/>
+ <location filename="src/qphotorec.cpp" line="497"/>
<source>Free: Scan for file from unallocated space only</source>
- <translation>Libre: Escanea por un archivo en el espacio que no es usado solamente.</translation>
+ <translation>Libre: Escanear por un archivo solamente en el espacio que no esta usado.</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="495"/>
+ <location filename="src/qphotorec.cpp" line="498"/>
<source>Whole: Extract files from whole partition</source>
- <translation>Todo: Sacar los archivos de toda la directoria</translation>
+ <translation>Todo: Extraer los archivos de toda la partición</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="522"/>
+ <location filename="src/qphotorec.cpp" line="525"/>
<source>&amp;Browse</source>
- <translation>&amp;Mirar</translation>
+ <translation>&amp;Explorar</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="538"/>
+ <location filename="src/qphotorec.cpp" line="541"/>
<source>&amp;Search</source>
<translation>&amp;Buscar</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="541"/>
+ <location filename="src/qphotorec.cpp" line="544"/>
<source>&amp;About</source>
<translation>&amp;Acerca de</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="542"/>
+ <location filename="src/qphotorec.cpp" line="545"/>
<source>&amp;File Formats</source>
- <translation>&amp;Formatos de el archivo</translation>
+ <translation>&amp;Formatos de archivo</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="642"/>
+ <location filename="src/qphotorec.cpp" line="645"/>
<source>Destination:</source>
- <translation>destinación:</translation>
+ <translation>Destino:</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="647"/>
+ <location filename="src/qphotorec.cpp" line="650"/>
<source>Recovery completed</source>
<translation>Recuperación completada</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="652"/>
+ <location filename="src/qphotorec.cpp" line="655"/>
<source>Bruteforce %1 sectors remaining (test %2)</source>
- <translation>Bruteforce quedan 1% sectores (testiar %2)</translation>
+ <translation>Bruteforce quedan 1% sectores (test %2)</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="660"/>
+ <location filename="src/qphotorec.cpp" line="663"/>
<source>Pass %1 - Reading sector %2/%3</source>
<translation>Pass %1 - Leyendo el sector %2/%3</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="665"/>
+ <location filename="src/qphotorec.cpp" line="668"/>
<source>%1/10 headers found</source>
<translation>%1/10 headers encontrado</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="667"/>
+ <location filename="src/qphotorec.cpp" line="670"/>
<source>%1 files found</source>
<translation>%1 de archivos encontrado</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="540"/>
- <location filename="src/qphotorec.cpp" line="762"/>
- <source>&amp;Quit</source>
- <translation>&amp;abandonar</translation>
- </message>
- <message>
- <location filename="src/qphotorec.cpp" line="750"/>
+ <location filename="src/qphotorec.cpp" line="753"/>
<source>File family</source>
<translation>Familia de archivos</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="751"/>
+ <location filename="src/qphotorec.cpp" line="543"/>
+ <location filename="src/qphotorec.cpp" line="765"/>
+ <source>&amp;Quit</source>
+ <translation>&amp;Abandonar</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="754"/>
<source>Number of files recovered</source>
- <translation>El numero de archivos recuperados</translation>
+ <translation>Archivos recuperados</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="834"/>
+ <location filename="src/qphotorec.cpp" line="837"/>
<source>QPhotoRec: Failed to create file!</source>
- <translation>QPhotoRec: fallo en crear un archivo!</translation>
+ <translation>QPhotoRec: No pudo crear un archivo!</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="835"/>
+ <location filename="src/qphotorec.cpp" line="838"/>
<source>Failed to create file! Please choose another destination</source>
- <translation>No se pudo crear un achivo! Por favor escoje otro directorio</translation>
+ <translation>No se pudo crear un archivo! Por favor escoje otro directorio</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="854"/>
+ <location filename="src/qphotorec.cpp" line="857"/>
<source>QPhotoRec: Not enough space!</source>
<translation>QPhotoRec: No hay suficiente espacio </translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="855"/>
+ <location filename="src/qphotorec.cpp" line="858"/>
<source>There is not enough space left! Please free disk space and/or choose another destination</source>
- <translation>No quedan bastante espacio! Por favor escoje otro disco duro con espacio o otro directorio</translation>
+ <translation> No hay suficiente espacio! Por favor libera espacio o escoje otro disco duro</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="924"/>
+ <location filename="src/qphotorec.cpp" line="927"/>
<source>QPhotoRec is is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
QPhotoRec is is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with QPhotoRec. If not, see &lt;http://www.gnu.org/licenses/&gt;.</source>
- <translation>QPhotoRect is es un programa gratis: Tu puedes redistribuirlo o modificarlo bajo el contrato de GNU General Public License como publicado por Free Software Foundation usando version 2 de la licensia o tu opcion de una de las ultima versiones.</translation>
+ <translation>QPhotoRect is es software libre: Tu puedes redistribuirlo y/o modificarlo bajo el contrato de GNU General Public License publicado por la Free Software Foundation usando la version 2 de la licencia o ( a tu elección) cualquier versión posterior.
+
+QPhotoRec se distribuye con la esperanza de que será útil, pero SIN NINGUNA GARANTÍA; ni siquiera la garantía implícita de comerciabilidad o aptitud para un propósito en particular. Vea la Licencia Pública General de GNU para más detalles.
+
+Debería haber recibido una copia de la Licencia Pública General de GNU junto con QPhotoRec. Si no es así, consulte &lt;http://www.gnu.org/licenses/&gt;.</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="925"/>
+ <location filename="src/qphotorec.cpp" line="928"/>
<source>QPhotoRec: About</source>
- <translation>QPhotoRec: Sobre</translation>
+ <translation>QPhotoRec: Acerca de</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="954"/>
+ <location filename="src/qphotorec.cpp" line="957"/>
<source>File Formats</source>
- <translation>EL formato de los archivos</translation>
+ <translation>Tipos de archivos</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="957"/>
+ <location filename="src/qphotorec.cpp" line="960"/>
<source>&amp;Reset</source>
- <translation>&amp;Empesar</translation>
+ <translation>&amp;Reiniciar</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="958"/>
+ <location filename="src/qphotorec.cpp" line="961"/>
<source>Res&amp;tore</source>
<translation>Res&amp;tore</translation>
</message>
diff --git a/src/lang/qphotorec.fr.ts b/src/lang/qphotorec.fr.ts
index bff0426..17ce6fa 100644
--- a/src/lang/qphotorec.fr.ts
+++ b/src/lang/qphotorec.fr.ts
@@ -8,7 +8,7 @@
</message>
<message>
<location filename="src/qphotorec.cpp" line="156"/>
- <location filename="src/qphotorec.cpp" line="518"/>
+ <location filename="src/qphotorec.cpp" line="521"/>
<source>Please select a destination to save the recovered files to.</source>
<translation>Merci de sélectionner une destination pour sauvegarder les fichiers récupérés.</translation>
</message>
@@ -61,22 +61,22 @@ Il faut être root pour utiliser ce programme.</translation>
<translation>Pas de disque!</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="452"/>
+ <location filename="src/qphotorec.cpp" line="455"/>
<source>Add a raw disk image...</source>
<translation>Ajouter une image disque...</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="458"/>
+ <location filename="src/qphotorec.cpp" line="461"/>
<source>PhotoRec is free software, and comes with ABSOLUTELY NO WARRANTY.</source>
<translation>PhotoRec est un logiciel libre, il vient avec ABSOLUMENT AUCUNE GARANTIE.</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="459"/>
+ <location filename="src/qphotorec.cpp" line="462"/>
<source>Please select a media to recover from</source>
<translation>Merci de sélectionner un média à partir duquel récupérer les données</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="462"/>
+ <location filename="src/qphotorec.cpp" line="465"/>
<source>Disk capacity must be correctly detected for a successful recovery.
If a disk listed above has an incorrect size, check HD jumper settings and BIOS
detection, and install the latest OS patches and disk drivers.</source>
@@ -84,143 +84,143 @@ detection, and install the latest OS patches and disk drivers.</source>
Si un disque listé ci dessus a une taille incorrecte, vérifier le paramétrage des cavaliers du disque et la détection au niveau du BIOS, installer les derniers correctifs au niveau de votre système d&apos;exploitation et des gestionnaires de disques.</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="469"/>
+ <location filename="src/qphotorec.cpp" line="472"/>
<source>Flags</source>
<translation>Drapeaux</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="470"/>
+ <location filename="src/qphotorec.cpp" line="473"/>
<source>Type</source>
<translation>Type</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="471"/>
+ <location filename="src/qphotorec.cpp" line="474"/>
<source>File System</source>
<translation>Système de fichiers</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="472"/>
+ <location filename="src/qphotorec.cpp" line="475"/>
<source>Size</source>
<translation>Taille</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="473"/>
+ <location filename="src/qphotorec.cpp" line="476"/>
<source>Label</source>
<translation>Label</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="488"/>
+ <location filename="src/qphotorec.cpp" line="491"/>
<source>File System type</source>
<translation>Type de système de fichiers</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="489"/>
+ <location filename="src/qphotorec.cpp" line="492"/>
<source>ext2/ext3/ext4 filesystem</source>
<translation>Système de fichier ext2/ext3/ext4</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="490"/>
+ <location filename="src/qphotorec.cpp" line="493"/>
<source>FAT/NTFS/HFS+/ReiserFS/...</source>
<translation>FAT/NTFS/HFS+/ReiserFS/...</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="494"/>
+ <location filename="src/qphotorec.cpp" line="497"/>
<source>Free: Scan for file from unallocated space only</source>
<translation>Free: Rechercher des fichiers depuis l&apos;espace non alloué uniquement</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="495"/>
+ <location filename="src/qphotorec.cpp" line="498"/>
<source>Whole: Extract files from whole partition</source>
<translation>Whole: Extraire les fichiers depuis la totalité de la partition</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="522"/>
+ <location filename="src/qphotorec.cpp" line="525"/>
<source>&amp;Browse</source>
<translation>&amp;Parcourir</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="538"/>
+ <location filename="src/qphotorec.cpp" line="541"/>
<source>&amp;Search</source>
<translation>&amp;Rechercher</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="541"/>
+ <location filename="src/qphotorec.cpp" line="544"/>
<source>&amp;About</source>
<translation>&amp;A propos</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="542"/>
+ <location filename="src/qphotorec.cpp" line="545"/>
<source>&amp;File Formats</source>
<translation>&amp;Formats de fichier</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="642"/>
+ <location filename="src/qphotorec.cpp" line="645"/>
<source>Destination:</source>
<translation>Destination:</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="647"/>
+ <location filename="src/qphotorec.cpp" line="650"/>
<source>Recovery completed</source>
<translation>Récupération de données terminée</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="652"/>
+ <location filename="src/qphotorec.cpp" line="655"/>
<source>Bruteforce %1 sectors remaining (test %2)</source>
<translation>Force brute %1 secteurs restants (test %2)</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="660"/>
+ <location filename="src/qphotorec.cpp" line="663"/>
<source>Pass %1 - Reading sector %2/%3</source>
<translation>Passe %1 - Lecture du secteur %2/%3</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="665"/>
+ <location filename="src/qphotorec.cpp" line="668"/>
<source>%1/10 headers found</source>
<translation>%1/10 entêtes trouvés</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="667"/>
+ <location filename="src/qphotorec.cpp" line="670"/>
<source>%1 files found</source>
<translation>%1 fichiers trouvés</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="540"/>
- <location filename="src/qphotorec.cpp" line="762"/>
- <source>&amp;Quit</source>
- <translation>&amp;Quitter</translation>
- </message>
- <message>
- <location filename="src/qphotorec.cpp" line="750"/>
+ <location filename="src/qphotorec.cpp" line="753"/>
<source>File family</source>
<translation>Familles de fichier</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="751"/>
+ <location filename="src/qphotorec.cpp" line="543"/>
+ <location filename="src/qphotorec.cpp" line="765"/>
+ <source>&amp;Quit</source>
+ <translation>&amp;Quitter</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="754"/>
<source>Number of files recovered</source>
<translation>Nombre de fichiers récupérés</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="834"/>
+ <location filename="src/qphotorec.cpp" line="837"/>
<source>QPhotoRec: Failed to create file!</source>
<translation>QPhotoRec: Échec de création de fichier!</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="835"/>
+ <location filename="src/qphotorec.cpp" line="838"/>
<source>Failed to create file! Please choose another destination</source>
<translation>Impossible de créer un fichier! Merci de sélectionner une autre destination</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="854"/>
+ <location filename="src/qphotorec.cpp" line="857"/>
<source>QPhotoRec: Not enough space!</source>
<translation>QPhotoRec: Pas assez d&apos;espace!</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="855"/>
+ <location filename="src/qphotorec.cpp" line="858"/>
<source>There is not enough space left! Please free disk space and/or choose another destination</source>
<translation>Il n&apos;y a pas assez d&apos;espace disponible! Merci de libérer de l&apos;espace disque et/ou de choisir une autre destination</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="924"/>
+ <location filename="src/qphotorec.cpp" line="927"/>
<source>QPhotoRec is is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
QPhotoRec is is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
@@ -233,24 +233,24 @@ QPhotoRec est distribué dans l&apos;espoir qu&apos;il sera utile, mais SANS AUC
Vous avez du recevoir un exemplaire de la Licence Publique Générale GNU avec ce programme ; si ce n&apos;est pas le cas, consulter &lt;http://www.gnu.org/licenses/&gt;.</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="925"/>
+ <location filename="src/qphotorec.cpp" line="928"/>
<source>QPhotoRec: About</source>
<translation>QPhotoRec: A propos</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="954"/>
+ <location filename="src/qphotorec.cpp" line="957"/>
<source>File Formats</source>
<translation>Formats de fichier</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="957"/>
+ <location filename="src/qphotorec.cpp" line="960"/>
<source>&amp;Reset</source>
<translation>&amp;Réinitialiser</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="958"/>
+ <location filename="src/qphotorec.cpp" line="961"/>
<source>Res&amp;tore</source>
<translation>Res&amp;taurer</translation>
</message>
</context>
-</TS>
+</TS> \ No newline at end of file
diff --git a/src/lang/qphotorec.it.ts b/src/lang/qphotorec.it.ts
index 2e4d7b6..55a87f0 100644
--- a/src/lang/qphotorec.it.ts
+++ b/src/lang/qphotorec.it.ts
@@ -8,7 +8,7 @@
</message>
<message>
<location filename="src/qphotorec.cpp" line="156"/>
- <location filename="src/qphotorec.cpp" line="518"/>
+ <location filename="src/qphotorec.cpp" line="521"/>
<source>Please select a destination to save the recovered files to.</source>
<translation>Scegliere la destinazione in cui si desidera salvare i documenti recuperati.</translation>
</message>
@@ -61,22 +61,22 @@ Si deve disporre di privilegi di root per usare PhotoRec.</translation>
<translation>Nessun Disco!</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="452"/>
+ <location filename="src/qphotorec.cpp" line="455"/>
<source>Add a raw disk image...</source>
<translation>Aggiungere un&apos;immagine raw del disco...</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="458"/>
+ <location filename="src/qphotorec.cpp" line="461"/>
<source>PhotoRec is free software, and comes with ABSOLUTELY NO WARRANTY.</source>
<translation>PhotoRec è un software libero e viene fornito ASSOLUTAMENTE SENZA ALCUNA GARANZIA.</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="459"/>
+ <location filename="src/qphotorec.cpp" line="462"/>
<source>Please select a media to recover from</source>
<translation>Selezionare un supporto dal quale eseguire l&apos;operazione di recupero</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="462"/>
+ <location filename="src/qphotorec.cpp" line="465"/>
<source>Disk capacity must be correctly detected for a successful recovery.
If a disk listed above has an incorrect size, check HD jumper settings and BIOS
detection, and install the latest OS patches and disk drivers.</source>
@@ -86,143 +86,143 @@ detection, e installare gli aggiornamenti del sistema operativo e i driver del d
</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="469"/>
+ <location filename="src/qphotorec.cpp" line="472"/>
<source>Flags</source>
<translation>Flag</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="470"/>
+ <location filename="src/qphotorec.cpp" line="473"/>
<source>Type</source>
<translation>Tipo</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="471"/>
+ <location filename="src/qphotorec.cpp" line="474"/>
<source>File System</source>
<translation>File System</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="472"/>
+ <location filename="src/qphotorec.cpp" line="475"/>
<source>Size</source>
<translation>Dimensione</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="473"/>
+ <location filename="src/qphotorec.cpp" line="476"/>
<source>Label</source>
<translation>Etichetta</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="488"/>
+ <location filename="src/qphotorec.cpp" line="491"/>
<source>File System type</source>
<translation>Tipo di File System</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="489"/>
+ <location filename="src/qphotorec.cpp" line="492"/>
<source>ext2/ext3/ext4 filesystem</source>
<translation>File system ext2/ext3/ext4</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="490"/>
+ <location filename="src/qphotorec.cpp" line="493"/>
<source>FAT/NTFS/HFS+/ReiserFS/...</source>
<translation>FAT/NTFS/HFS+/ReiserFS/...</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="494"/>
+ <location filename="src/qphotorec.cpp" line="497"/>
<source>Free: Scan for file from unallocated space only</source>
<translation>Libero: ricerca di documenti unicamente nello spazio non allocato</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="495"/>
+ <location filename="src/qphotorec.cpp" line="498"/>
<source>Whole: Extract files from whole partition</source>
<translation>Completo: Estrazione dei documenti da tutta la partizione</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="522"/>
+ <location filename="src/qphotorec.cpp" line="525"/>
<source>&amp;Browse</source>
<translation>&amp;Naviga</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="538"/>
+ <location filename="src/qphotorec.cpp" line="541"/>
<source>&amp;Search</source>
<translation>&amp;Cerca</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="541"/>
+ <location filename="src/qphotorec.cpp" line="544"/>
<source>&amp;About</source>
<translation>&amp;Info</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="542"/>
+ <location filename="src/qphotorec.cpp" line="545"/>
<source>&amp;File Formats</source>
<translation>&amp;Formati dei file</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="642"/>
+ <location filename="src/qphotorec.cpp" line="645"/>
<source>Destination:</source>
<translation>Destinazione:</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="647"/>
+ <location filename="src/qphotorec.cpp" line="650"/>
<source>Recovery completed</source>
<translation>Recupero terminato</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="652"/>
+ <location filename="src/qphotorec.cpp" line="655"/>
<source>Bruteforce %1 sectors remaining (test %2)</source>
<translation>Esaustiva %1 settori rimanenti (test %2)</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="660"/>
+ <location filename="src/qphotorec.cpp" line="663"/>
<source>Pass %1 - Reading sector %2/%3</source>
<translation>Iterazione %1 - Lettura del settore %2/%3</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="665"/>
+ <location filename="src/qphotorec.cpp" line="668"/>
<source>%1/10 headers found</source>
<translation>%1/10 intestazioni trovate</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="667"/>
+ <location filename="src/qphotorec.cpp" line="670"/>
<source>%1 files found</source>
<translation>%1 documenti trovati</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="540"/>
- <location filename="src/qphotorec.cpp" line="762"/>
- <source>&amp;Quit</source>
- <translation>&amp;Uscire</translation>
- </message>
- <message>
- <location filename="src/qphotorec.cpp" line="750"/>
+ <location filename="src/qphotorec.cpp" line="753"/>
<source>File family</source>
<translation>famiglia dei file</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="751"/>
+ <location filename="src/qphotorec.cpp" line="543"/>
+ <location filename="src/qphotorec.cpp" line="765"/>
+ <source>&amp;Quit</source>
+ <translation>&amp;Uscire</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="754"/>
<source>Number of files recovered</source>
<translation>numero dei file recuperati</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="834"/>
+ <location filename="src/qphotorec.cpp" line="837"/>
<source>QPhotoRec: Failed to create file!</source>
<translation>QPhotoRec: Impossibile creare il file!</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="835"/>
+ <location filename="src/qphotorec.cpp" line="838"/>
<source>Failed to create file! Please choose another destination</source>
<translation>Impossibile creare il file! Selezionare un&apos;altra destinazione</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="854"/>
+ <location filename="src/qphotorec.cpp" line="857"/>
<source>QPhotoRec: Not enough space!</source>
<translation>QPhotoRec: Spazio insufficiente!</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="855"/>
+ <location filename="src/qphotorec.cpp" line="858"/>
<source>There is not enough space left! Please free disk space and/or choose another destination</source>
<translation>Spazio disponibile insufficiente. Liberare spazio su disco e/o scegliere un&apos;altra destinazione</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="924"/>
+ <location filename="src/qphotorec.cpp" line="927"/>
<source>QPhotoRec is is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
QPhotoRec is is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
@@ -235,24 +235,24 @@ QPhotoRec viene distribuito con la speranza che possa essere utile ma SENZA ALCU
Una copia della GNU General Public License è distribuita con QPhotoRec. In caso contrario se ne può ottenere una all&apos;indirizzo &lt;http://www.gnu.org/licenses/&gt;.</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="925"/>
+ <location filename="src/qphotorec.cpp" line="928"/>
<source>QPhotoRec: About</source>
<translation>QPhotoRec: A proposito</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="954"/>
+ <location filename="src/qphotorec.cpp" line="957"/>
<source>File Formats</source>
<translation>Formati dei file</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="957"/>
+ <location filename="src/qphotorec.cpp" line="960"/>
<source>&amp;Reset</source>
<translation>&amp;Resettare</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="958"/>
+ <location filename="src/qphotorec.cpp" line="961"/>
<source>Res&amp;tore</source>
<translation>Ripri&amp;stinare</translation>
</message>
</context>
-</TS>
+</TS> \ No newline at end of file
diff --git a/src/lang/qphotorec.ja.ts b/src/lang/qphotorec.ja.ts
index dd222e1..4258334 100644
--- a/src/lang/qphotorec.ja.ts
+++ b/src/lang/qphotorec.ja.ts
@@ -8,7 +8,7 @@
</message>
<message>
<location filename="src/qphotorec.cpp" line="156"/>
- <location filename="src/qphotorec.cpp" line="518"/>
+ <location filename="src/qphotorec.cpp" line="521"/>
<source>Please select a destination to save the recovered files to.</source>
<translation>復元したファイルの保存先を選択してください。</translation>
</message>
@@ -61,22 +61,22 @@ PhotoRecを使うにはrootユーザになる必要があります。</translati
<translation>ディスクがありません!</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="452"/>
+ <location filename="src/qphotorec.cpp" line="455"/>
<source>Add a raw disk image...</source>
<translation>復元元ディスクイメージを追加</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="458"/>
+ <location filename="src/qphotorec.cpp" line="461"/>
<source>PhotoRec is free software, and comes with ABSOLUTELY NO WARRANTY.</source>
<translation>PhotoRecは無料のソフトウェアで、一切の保証はありません。</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="459"/>
+ <location filename="src/qphotorec.cpp" line="462"/>
<source>Please select a media to recover from</source>
<translation>復元元のメディアを選択してください</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="462"/>
+ <location filename="src/qphotorec.cpp" line="465"/>
<source>Disk capacity must be correctly detected for a successful recovery.
If a disk listed above has an incorrect size, check HD jumper settings and BIOS
detection, and install the latest OS patches and disk drivers.</source>
@@ -84,143 +84,143 @@ detection, and install the latest OS patches and disk drivers.</source>
上に列挙されたディスクに正しくない容量が表示されていたら、ハードディスクのジャンパ設定とBIOSで検知されている内容を確認し、最新のOSパッチとディスクドライバをインストールしてください。</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="469"/>
+ <location filename="src/qphotorec.cpp" line="472"/>
<source>Flags</source>
<translation>フラグ</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="470"/>
+ <location filename="src/qphotorec.cpp" line="473"/>
<source>Type</source>
<translation>タイプ</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="471"/>
+ <location filename="src/qphotorec.cpp" line="474"/>
<source>File System</source>
<translation>ファイルシステム</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="472"/>
+ <location filename="src/qphotorec.cpp" line="475"/>
<source>Size</source>
<translation>サイズ</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="473"/>
+ <location filename="src/qphotorec.cpp" line="476"/>
<source>Label</source>
<translation>ラベル</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="488"/>
+ <location filename="src/qphotorec.cpp" line="491"/>
<source>File System type</source>
<translation>ファイルシステムの種類</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="489"/>
+ <location filename="src/qphotorec.cpp" line="492"/>
<source>ext2/ext3/ext4 filesystem</source>
<translation>ext2/ext3/ext4 ファイルシステム</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="490"/>
+ <location filename="src/qphotorec.cpp" line="493"/>
<source>FAT/NTFS/HFS+/ReiserFS/...</source>
<translation>FAT/NTFS/HFS+/ReiserFS/...</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="494"/>
+ <location filename="src/qphotorec.cpp" line="497"/>
<source>Free: Scan for file from unallocated space only</source>
<translation type="unfinished"/>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="495"/>
+ <location filename="src/qphotorec.cpp" line="498"/>
<source>Whole: Extract files from whole partition</source>
<translation>すべて: すべてのパーティションからファイルを抽出する</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="522"/>
+ <location filename="src/qphotorec.cpp" line="525"/>
<source>&amp;Browse</source>
<translation>&amp;参照</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="538"/>
+ <location filename="src/qphotorec.cpp" line="541"/>
<source>&amp;Search</source>
<translation>&amp;検索</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="541"/>
+ <location filename="src/qphotorec.cpp" line="544"/>
<source>&amp;About</source>
<translation type="unfinished"/>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="542"/>
+ <location filename="src/qphotorec.cpp" line="545"/>
<source>&amp;File Formats</source>
<translation>&amp;ファイルフォーマット</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="642"/>
+ <location filename="src/qphotorec.cpp" line="645"/>
<source>Destination:</source>
<translation>復元先</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="647"/>
+ <location filename="src/qphotorec.cpp" line="650"/>
<source>Recovery completed</source>
<translation>復元完了</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="652"/>
+ <location filename="src/qphotorec.cpp" line="655"/>
<source>Bruteforce %1 sectors remaining (test %2)</source>
<translation type="unfinished"/>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="660"/>
+ <location filename="src/qphotorec.cpp" line="663"/>
<source>Pass %1 - Reading sector %2/%3</source>
<translation type="unfinished"/>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="665"/>
+ <location filename="src/qphotorec.cpp" line="668"/>
<source>%1/10 headers found</source>
<translation>%1/10 ヘッダーが見つかりました</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="667"/>
+ <location filename="src/qphotorec.cpp" line="670"/>
<source>%1 files found</source>
<translation>%1 個のファイルが見つかりました。</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="540"/>
- <location filename="src/qphotorec.cpp" line="762"/>
- <source>&amp;Quit</source>
- <translation>&amp;終了</translation>
- </message>
- <message>
- <location filename="src/qphotorec.cpp" line="750"/>
+ <location filename="src/qphotorec.cpp" line="753"/>
<source>File family</source>
<translation type="unfinished"/>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="751"/>
+ <location filename="src/qphotorec.cpp" line="543"/>
+ <location filename="src/qphotorec.cpp" line="765"/>
+ <source>&amp;Quit</source>
+ <translation>&amp;終了</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="754"/>
<source>Number of files recovered</source>
<translation>復元したファイルの数</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="834"/>
+ <location filename="src/qphotorec.cpp" line="837"/>
<source>QPhotoRec: Failed to create file!</source>
<translation>QPhotoRec: ファイル作成に失敗しました!</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="835"/>
+ <location filename="src/qphotorec.cpp" line="838"/>
<source>Failed to create file! Please choose another destination</source>
<translation>ファイルの作成に失敗しました! 別の保存先を選んでください。</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="854"/>
+ <location filename="src/qphotorec.cpp" line="857"/>
<source>QPhotoRec: Not enough space!</source>
<translation>QPhotoRec: 十分な空き容量がありません!</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="855"/>
+ <location filename="src/qphotorec.cpp" line="858"/>
<source>There is not enough space left! Please free disk space and/or choose another destination</source>
<translation>十分な空き容量がありません! ディスクの空き容量を増やすかまたは別の復元先を指定してください</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="924"/>
+ <location filename="src/qphotorec.cpp" line="927"/>
<source>QPhotoRec is is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
QPhotoRec is is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
@@ -229,24 +229,24 @@ You should have received a copy of the GNU General Public License along with QPh
<translation type="unfinished"/>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="925"/>
+ <location filename="src/qphotorec.cpp" line="928"/>
<source>QPhotoRec: About</source>
<translation type="unfinished"/>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="954"/>
+ <location filename="src/qphotorec.cpp" line="957"/>
<source>File Formats</source>
<translation>ファイルフォーマット</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="957"/>
+ <location filename="src/qphotorec.cpp" line="960"/>
<source>&amp;Reset</source>
<translation>&amp;リセット</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="958"/>
+ <location filename="src/qphotorec.cpp" line="961"/>
<source>Res&amp;tore</source>
<translation type="unfinished"/>
</message>
</context>
-</TS>
+</TS> \ No newline at end of file
diff --git a/src/lang/qphotorec.pt.ts b/src/lang/qphotorec.pt.ts
index c6af4fd..cddfb18 100644
--- a/src/lang/qphotorec.pt.ts
+++ b/src/lang/qphotorec.pt.ts
@@ -8,7 +8,7 @@
</message>
<message>
<location filename="src/qphotorec.cpp" line="156"/>
- <location filename="src/qphotorec.cpp" line="518"/>
+ <location filename="src/qphotorec.cpp" line="521"/>
<source>Please select a destination to save the recovered files to.</source>
<translation>Por favor selecionar o destino para salvar os arquivos recuperados.</translation>
</message>
@@ -61,22 +61,22 @@ Você precisa ser root para usar PhotoRec.</translation>
<translation>Sem disco!</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="452"/>
+ <location filename="src/qphotorec.cpp" line="455"/>
<source>Add a raw disk image...</source>
<translation>Adicionar imagem de disco raw...</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="458"/>
+ <location filename="src/qphotorec.cpp" line="461"/>
<source>PhotoRec is free software, and comes with ABSOLUTELY NO WARRANTY.</source>
<translation>PhotoRec é um software livre, e não vem com ABSOLUTAMENTE NENHUMA GARANTIA.</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="459"/>
+ <location filename="src/qphotorec.cpp" line="462"/>
<source>Please select a media to recover from</source>
<translation>Por favor selecionar a midia para recuperar</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="462"/>
+ <location filename="src/qphotorec.cpp" line="465"/>
<source>Disk capacity must be correctly detected for a successful recovery.
If a disk listed above has an incorrect size, check HD jumper settings and BIOS
detection, and install the latest OS patches and disk drivers.</source>
@@ -85,143 +85,143 @@ Se o disco listado abaixo não tem o tamanho certo, verificar o jumper do HD nas
detecar, e instalar o ultimo patch do SO e drivers do disco.</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="469"/>
+ <location filename="src/qphotorec.cpp" line="472"/>
<source>Flags</source>
<translation>Flags</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="470"/>
+ <location filename="src/qphotorec.cpp" line="473"/>
<source>Type</source>
<translation>Tipo</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="471"/>
+ <location filename="src/qphotorec.cpp" line="474"/>
<source>File System</source>
<translation>Sistema de arquivos</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="472"/>
+ <location filename="src/qphotorec.cpp" line="475"/>
<source>Size</source>
<translation>Tamanho</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="473"/>
+ <location filename="src/qphotorec.cpp" line="476"/>
<source>Label</source>
<translation>Etiqueta</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="488"/>
+ <location filename="src/qphotorec.cpp" line="491"/>
<source>File System type</source>
<translation>Tipo de sistema de arquivos</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="489"/>
+ <location filename="src/qphotorec.cpp" line="492"/>
<source>ext2/ext3/ext4 filesystem</source>
<translation>Sistemas de arquivos ext2/ext3/ext4</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="490"/>
+ <location filename="src/qphotorec.cpp" line="493"/>
<source>FAT/NTFS/HFS+/ReiserFS/...</source>
<translation>FAT/NTFS/HFS+/ReiserFS/...</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="494"/>
+ <location filename="src/qphotorec.cpp" line="497"/>
<source>Free: Scan for file from unallocated space only</source>
<translation>Livre: Esconear por arquivos de espaços não alocados somente.</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="495"/>
+ <location filename="src/qphotorec.cpp" line="498"/>
<source>Whole: Extract files from whole partition</source>
<translation>Inteiro: Extrair arquivos da partição inteira</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="522"/>
+ <location filename="src/qphotorec.cpp" line="525"/>
<source>&amp;Browse</source>
<translation>&amp;Browse</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="538"/>
+ <location filename="src/qphotorec.cpp" line="541"/>
<source>&amp;Search</source>
<translation>&amp;Pesquisar</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="541"/>
+ <location filename="src/qphotorec.cpp" line="544"/>
<source>&amp;About</source>
<translation>&amp;Sobre</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="542"/>
+ <location filename="src/qphotorec.cpp" line="545"/>
<source>&amp;File Formats</source>
<translation>&amp;Formatos de arquivos</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="642"/>
+ <location filename="src/qphotorec.cpp" line="645"/>
<source>Destination:</source>
<translation>Destino:</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="647"/>
+ <location filename="src/qphotorec.cpp" line="650"/>
<source>Recovery completed</source>
<translation>Recuperação completada</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="652"/>
+ <location filename="src/qphotorec.cpp" line="655"/>
<source>Bruteforce %1 sectors remaining (test %2)</source>
<translation>Bruteforce %1 setores restantes (teste %2)</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="660"/>
+ <location filename="src/qphotorec.cpp" line="663"/>
<source>Pass %1 - Reading sector %2/%3</source>
<translation>Passar %1 - Lendo setor %2/%3</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="665"/>
+ <location filename="src/qphotorec.cpp" line="668"/>
<source>%1/10 headers found</source>
<translation>%1/10 headers encontrados</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="667"/>
+ <location filename="src/qphotorec.cpp" line="670"/>
<source>%1 files found</source>
<translation>%1 arquivos encontrados</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="540"/>
- <location filename="src/qphotorec.cpp" line="762"/>
- <source>&amp;Quit</source>
- <translation>&amp;Sair</translation>
- </message>
- <message>
- <location filename="src/qphotorec.cpp" line="750"/>
+ <location filename="src/qphotorec.cpp" line="753"/>
<source>File family</source>
<translation>Familia do arquivo</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="751"/>
+ <location filename="src/qphotorec.cpp" line="543"/>
+ <location filename="src/qphotorec.cpp" line="765"/>
+ <source>&amp;Quit</source>
+ <translation>&amp;Sair</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="754"/>
<source>Number of files recovered</source>
<translation>Número de arquivos recuperados</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="834"/>
+ <location filename="src/qphotorec.cpp" line="837"/>
<source>QPhotoRec: Failed to create file!</source>
<translation>QPhotoRec: Falha ao criar o arquivo!</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="835"/>
+ <location filename="src/qphotorec.cpp" line="838"/>
<source>Failed to create file! Please choose another destination</source>
<translation>Falha ao criar o arquivo! Por favor selecionar outro destino</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="854"/>
+ <location filename="src/qphotorec.cpp" line="857"/>
<source>QPhotoRec: Not enough space!</source>
<translation>QPhotoRec: Sem espaço suficiente!</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="855"/>
+ <location filename="src/qphotorec.cpp" line="858"/>
<source>There is not enough space left! Please free disk space and/or choose another destination</source>
<translation>Não tem espaço suficiente! Por favor mais espaço em disco e/ou selecione outro destino</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="924"/>
+ <location filename="src/qphotorec.cpp" line="927"/>
<source>QPhotoRec is is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
QPhotoRec is is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
@@ -234,24 +234,24 @@ QPhotoRec é distribuido na esperança de ser util, porém sem qualquer garantia
Você deve receber uma cópia do licença GNU durante o uso de QPhotoRec. Se não, visite &lt;https://www.gnu.org/licenses/&gt;.</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="925"/>
+ <location filename="src/qphotorec.cpp" line="928"/>
<source>QPhotoRec: About</source>
<translation>QPhotoRec: Sobre</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="954"/>
+ <location filename="src/qphotorec.cpp" line="957"/>
<source>File Formats</source>
<translation>Formatos de arquivos</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="957"/>
+ <location filename="src/qphotorec.cpp" line="960"/>
<source>&amp;Reset</source>
<translation>&amp;Reconfigurar</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="958"/>
+ <location filename="src/qphotorec.cpp" line="961"/>
<source>Res&amp;tore</source>
<translation>&amp;Restaurar</translation>
</message>
</context>
-</TS>
+</TS> \ No newline at end of file
diff --git a/src/lang/qphotorec.ru.ts b/src/lang/qphotorec.ru.ts
index 3f0f709..ba2d4cd 100644
--- a/src/lang/qphotorec.ru.ts
+++ b/src/lang/qphotorec.ru.ts
@@ -8,7 +8,7 @@
</message>
<message>
<location filename="src/qphotorec.cpp" line="156"/>
- <location filename="src/qphotorec.cpp" line="518"/>
+ <location filename="src/qphotorec.cpp" line="521"/>
<source>Please select a destination to save the recovered files to.</source>
<translation>Выберите назначение для сохранения восстановленных файлов.</translation>
</message>
@@ -61,22 +61,22 @@ You need to be root to use PhotoRec.</source>
<translation>Нет диска!</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="452"/>
+ <location filename="src/qphotorec.cpp" line="455"/>
<source>Add a raw disk image...</source>
<translation>Добавить образ raw диска...</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="458"/>
+ <location filename="src/qphotorec.cpp" line="461"/>
<source>PhotoRec is free software, and comes with ABSOLUTELY NO WARRANTY.</source>
<translation>PhotoRec является свободным программным обеспечением и поставляется с БЕЗ ВСЯКИХ ГАРАНТИЙ.</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="459"/>
+ <location filename="src/qphotorec.cpp" line="462"/>
<source>Please select a media to recover from</source>
<translation>Выберите носитель для восстановления из</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="462"/>
+ <location filename="src/qphotorec.cpp" line="465"/>
<source>Disk capacity must be correctly detected for a successful recovery.
If a disk listed above has an incorrect size, check HD jumper settings and BIOS
detection, and install the latest OS patches and disk drivers.</source>
@@ -85,143 +85,143 @@ detection, and install the latest OS patches and disk drivers.</source>
и обнаружение BIOS, и установите последние обновления операционной системы и дисковых накопителей.</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="469"/>
+ <location filename="src/qphotorec.cpp" line="472"/>
<source>Flags</source>
<translation>Флаги</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="470"/>
+ <location filename="src/qphotorec.cpp" line="473"/>
<source>Type</source>
<translation>Тип</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="471"/>
+ <location filename="src/qphotorec.cpp" line="474"/>
<source>File System</source>
<translation>Файловая система</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="472"/>
+ <location filename="src/qphotorec.cpp" line="475"/>
<source>Size</source>
<translation>Размер</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="473"/>
+ <location filename="src/qphotorec.cpp" line="476"/>
<source>Label</source>
<translation>Метка</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="488"/>
+ <location filename="src/qphotorec.cpp" line="491"/>
<source>File System type</source>
<translation>Тип файловой системы</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="489"/>
+ <location filename="src/qphotorec.cpp" line="492"/>
<source>ext2/ext3/ext4 filesystem</source>
<translation>Файловая система ext2/ext3/ext4</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="490"/>
+ <location filename="src/qphotorec.cpp" line="493"/>
<source>FAT/NTFS/HFS+/ReiserFS/...</source>
<translation>Файловая система FAT/NTFS/HFS+/ReiserFS/...</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="494"/>
+ <location filename="src/qphotorec.cpp" line="497"/>
<source>Free: Scan for file from unallocated space only</source>
<translation>Свободное: Сканирование файла только из незанятого пространства</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="495"/>
+ <location filename="src/qphotorec.cpp" line="498"/>
<source>Whole: Extract files from whole partition</source>
<translation>Весь: Извлечение файлов из всего раздела</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="522"/>
+ <location filename="src/qphotorec.cpp" line="525"/>
<source>&amp;Browse</source>
<translation>О&amp;бзор</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="538"/>
+ <location filename="src/qphotorec.cpp" line="541"/>
<source>&amp;Search</source>
<translation>&amp;Поиск</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="541"/>
+ <location filename="src/qphotorec.cpp" line="544"/>
<source>&amp;About</source>
<translation>&amp;О программе</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="542"/>
+ <location filename="src/qphotorec.cpp" line="545"/>
<source>&amp;File Formats</source>
<translation>&amp;Форматы файлов</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="642"/>
+ <location filename="src/qphotorec.cpp" line="645"/>
<source>Destination:</source>
<translation>Назначение:</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="647"/>
+ <location filename="src/qphotorec.cpp" line="650"/>
<source>Recovery completed</source>
<translation>Восстановление завершено</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="652"/>
+ <location filename="src/qphotorec.cpp" line="655"/>
<source>Bruteforce %1 sectors remaining (test %2)</source>
<translation>Полный перебор %1 оставшихся секторов (тест %2)</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="660"/>
+ <location filename="src/qphotorec.cpp" line="663"/>
<source>Pass %1 - Reading sector %2/%3</source>
<translation>Проход %1 - Чтение сектора %2/%3</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="665"/>
+ <location filename="src/qphotorec.cpp" line="668"/>
<source>%1/10 headers found</source>
<translation>Найдено %1/10 заголовков</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="667"/>
+ <location filename="src/qphotorec.cpp" line="670"/>
<source>%1 files found</source>
<translation>Найдено %1 файлов</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="540"/>
- <location filename="src/qphotorec.cpp" line="762"/>
- <source>&amp;Quit</source>
- <translation>В&amp;ыход</translation>
- </message>
- <message>
- <location filename="src/qphotorec.cpp" line="750"/>
+ <location filename="src/qphotorec.cpp" line="753"/>
<source>File family</source>
<translation>Семейство файлов</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="751"/>
+ <location filename="src/qphotorec.cpp" line="543"/>
+ <location filename="src/qphotorec.cpp" line="765"/>
+ <source>&amp;Quit</source>
+ <translation>В&amp;ыход</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="754"/>
<source>Number of files recovered</source>
<translation>Количество восстановленных</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="834"/>
+ <location filename="src/qphotorec.cpp" line="837"/>
<source>QPhotoRec: Failed to create file!</source>
<translation>QPhotoRec: Не удалось создать файл!</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="835"/>
+ <location filename="src/qphotorec.cpp" line="838"/>
<source>Failed to create file! Please choose another destination</source>
<translation>Не удалось создать файл! Выберите другое назначение</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="854"/>
+ <location filename="src/qphotorec.cpp" line="857"/>
<source>QPhotoRec: Not enough space!</source>
<translation>PhotoRec: Не хватает места!</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="855"/>
+ <location filename="src/qphotorec.cpp" line="858"/>
<source>There is not enough space left! Please free disk space and/or choose another destination</source>
<translation>Там не осталось свободного места! Освободите место на диске или выберите другое место назначения</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="924"/>
+ <location filename="src/qphotorec.cpp" line="927"/>
<source>QPhotoRec is is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
QPhotoRec is is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
@@ -234,24 +234,24 @@ PhotoRec распространяется в надежде, что она бу
Вы должны были получить копию GNU General Public License вместе с PhotoRec. Если нет, смотрите &lt;http://www.gnu.org/licenses/&gt;.</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="925"/>
+ <location filename="src/qphotorec.cpp" line="928"/>
<source>QPhotoRec: About</source>
<translation>О программе QPhotoRec</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="954"/>
+ <location filename="src/qphotorec.cpp" line="957"/>
<source>File Formats</source>
<translation>Форматы файлов</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="957"/>
+ <location filename="src/qphotorec.cpp" line="960"/>
<source>&amp;Reset</source>
<translation>Сб&amp;росить</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="958"/>
+ <location filename="src/qphotorec.cpp" line="961"/>
<source>Res&amp;tore</source>
<translation>&amp;Вернуть</translation>
</message>
</context>
-</TS>
+</TS> \ No newline at end of file
diff --git a/src/lang/qphotorec.tr.ts b/src/lang/qphotorec.tr.ts
index 9b49693..0b226be 100644
--- a/src/lang/qphotorec.tr.ts
+++ b/src/lang/qphotorec.tr.ts
@@ -8,7 +8,7 @@
</message>
<message>
<location filename="src/qphotorec.cpp" line="156"/>
- <location filename="src/qphotorec.cpp" line="518"/>
+ <location filename="src/qphotorec.cpp" line="521"/>
<source>Please select a destination to save the recovered files to.</source>
<translation>Lütfen kurtarılan dosyaların kaydedeceği konumu seçin.</translation>
</message>
@@ -61,22 +61,22 @@ PhotoRec&apos;i kullanmanız için &quot;root&quot; kullanıcısı olmalısını
<translation>Disk yok</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="452"/>
+ <location filename="src/qphotorec.cpp" line="455"/>
<source>Add a raw disk image...</source>
<translation>Ham (Raw) disk imajı ekleyin</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="458"/>
+ <location filename="src/qphotorec.cpp" line="461"/>
<source>PhotoRec is free software, and comes with ABSOLUTELY NO WARRANTY.</source>
<translation>PhotoRec ücresiz bir yazılımdır ve verilerin kurtarılması konusunda herhangi bir garanti vermez.</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="459"/>
+ <location filename="src/qphotorec.cpp" line="462"/>
<source>Please select a media to recover from</source>
<translation>Lütfen kurtarılmasını istediğiniz ortamı seçin</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="462"/>
+ <location filename="src/qphotorec.cpp" line="465"/>
<source>Disk capacity must be correctly detected for a successful recovery.
If a disk listed above has an incorrect size, check HD jumper settings and BIOS
detection, and install the latest OS patches and disk drivers.</source>
@@ -85,143 +85,143 @@ Eğer aşağıdaki listedeki bir disk yanlış boyutta belirlenmişse disk jumpe
</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="469"/>
+ <location filename="src/qphotorec.cpp" line="472"/>
<source>Flags</source>
<translation>İşareti</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="470"/>
+ <location filename="src/qphotorec.cpp" line="473"/>
<source>Type</source>
<translation>Tipi</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="471"/>
+ <location filename="src/qphotorec.cpp" line="474"/>
<source>File System</source>
<translation>Dosya Sistemi</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="472"/>
+ <location filename="src/qphotorec.cpp" line="475"/>
<source>Size</source>
<translation>Boyutu</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="473"/>
+ <location filename="src/qphotorec.cpp" line="476"/>
<source>Label</source>
<translation>Etiketi</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="488"/>
+ <location filename="src/qphotorec.cpp" line="491"/>
<source>File System type</source>
<translation>Dosya Sistemi türü</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="489"/>
+ <location filename="src/qphotorec.cpp" line="492"/>
<source>ext2/ext3/ext4 filesystem</source>
<translation>ext2/ext3/ext4 dosya sistemleri</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="490"/>
+ <location filename="src/qphotorec.cpp" line="493"/>
<source>FAT/NTFS/HFS+/ReiserFS/...</source>
<translation>FAT/NTFS/HFS+/ReiserFS/...</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="494"/>
+ <location filename="src/qphotorec.cpp" line="497"/>
<source>Free: Scan for file from unallocated space only</source>
<translation>Boş alan: Sadece bir disk olarak tanımlanmamış alanı tara</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="495"/>
+ <location filename="src/qphotorec.cpp" line="498"/>
<source>Whole: Extract files from whole partition</source>
<translation>Tamamı: Tüm bölümden dosyaları çıkart</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="522"/>
+ <location filename="src/qphotorec.cpp" line="525"/>
<source>&amp;Browse</source>
<translation>&amp;Gözat</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="538"/>
+ <location filename="src/qphotorec.cpp" line="541"/>
<source>&amp;Search</source>
<translation>&amp;Ara</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="541"/>
+ <location filename="src/qphotorec.cpp" line="544"/>
<source>&amp;About</source>
<translation>&amp;Hakkında</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="542"/>
+ <location filename="src/qphotorec.cpp" line="545"/>
<source>&amp;File Formats</source>
<translation>&amp;Dosya Formatları</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="642"/>
+ <location filename="src/qphotorec.cpp" line="645"/>
<source>Destination:</source>
<translation>Hedef:</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="647"/>
+ <location filename="src/qphotorec.cpp" line="650"/>
<source>Recovery completed</source>
<translation>Kurtarma tamamlandı</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="652"/>
+ <location filename="src/qphotorec.cpp" line="655"/>
<source>Bruteforce %1 sectors remaining (test %2)</source>
<translation>Bruteforce %1 sektör kaldı (test %2)</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="660"/>
+ <location filename="src/qphotorec.cpp" line="663"/>
<source>Pass %1 - Reading sector %2/%3</source>
<translation>Tamamlanan %1 - Okunan sektör %2/%3</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="665"/>
+ <location filename="src/qphotorec.cpp" line="668"/>
<source>%1/10 headers found</source>
<translation>%1/10 kafa bulundu</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="667"/>
+ <location filename="src/qphotorec.cpp" line="670"/>
<source>%1 files found</source>
<translation>%1 dosya bulundu</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="540"/>
- <location filename="src/qphotorec.cpp" line="762"/>
- <source>&amp;Quit</source>
- <translation>&amp;Çıkış</translation>
- </message>
- <message>
- <location filename="src/qphotorec.cpp" line="750"/>
+ <location filename="src/qphotorec.cpp" line="753"/>
<source>File family</source>
<translation>Dosya ailesi</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="751"/>
+ <location filename="src/qphotorec.cpp" line="543"/>
+ <location filename="src/qphotorec.cpp" line="765"/>
+ <source>&amp;Quit</source>
+ <translation>&amp;Çıkış</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="754"/>
<source>Number of files recovered</source>
<translation>Kurtarılan dosya sayısı</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="834"/>
+ <location filename="src/qphotorec.cpp" line="837"/>
<source>QPhotoRec: Failed to create file!</source>
<translation>QPhotoRec: Dosya oluşturulamadı</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="835"/>
+ <location filename="src/qphotorec.cpp" line="838"/>
<source>Failed to create file! Please choose another destination</source>
<translation>Dosya oluşturulamadı! Lütfen başka bir konum seçin.</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="854"/>
+ <location filename="src/qphotorec.cpp" line="857"/>
<source>QPhotoRec: Not enough space!</source>
<translation>QPhotoRec: Yeterli alan yok!</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="855"/>
+ <location filename="src/qphotorec.cpp" line="858"/>
<source>There is not enough space left! Please free disk space and/or choose another destination</source>
<translation>Diskte yeterli alan kalmadı! Lütfen diskte boş alan açın ve/veya başka bir hedef disk seçin.</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="924"/>
+ <location filename="src/qphotorec.cpp" line="927"/>
<source>QPhotoRec is is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
QPhotoRec is is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
@@ -234,24 +234,24 @@ QPhotoRec işe yarayacağı öngörüsü ile dağıtılmıştır fakat; TİCAR
QPhotoRec ile birlikte GNU Genel Kamu Lisansı&apos;nın bir kopyasını almış olmalısınız. Eğer yoksa &lt;http://www.gnu.org/licenses/&gt; .</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="925"/>
+ <location filename="src/qphotorec.cpp" line="928"/>
<source>QPhotoRec: About</source>
<translation>QPhotoRec: Hakkında</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="954"/>
+ <location filename="src/qphotorec.cpp" line="957"/>
<source>File Formats</source>
<translation>Dosya Türleri</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="957"/>
+ <location filename="src/qphotorec.cpp" line="960"/>
<source>&amp;Reset</source>
<translation>&amp;Hiçbiri</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="958"/>
+ <location filename="src/qphotorec.cpp" line="961"/>
<source>Res&amp;tore</source>
<translation>&amp;Tümü</translation>
</message>
</context>
-</TS>
+</TS> \ No newline at end of file
diff --git a/src/lang/qphotorec.zh_TW.ts b/src/lang/qphotorec.zh_TW.ts
index ab7468d..e8c00df 100644
--- a/src/lang/qphotorec.zh_TW.ts
+++ b/src/lang/qphotorec.zh_TW.ts
@@ -8,7 +8,7 @@
</message>
<message>
<location filename="src/qphotorec.cpp" line="156"/>
- <location filename="src/qphotorec.cpp" line="518"/>
+ <location filename="src/qphotorec.cpp" line="521"/>
<source>Please select a destination to save the recovered files to.</source>
<translation>請選擇要儲存還原檔案的目的地。</translation>
</message>
@@ -61,22 +61,22 @@ You need to be root to use PhotoRec.</source>
<translation>沒有磁碟!</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="452"/>
+ <location filename="src/qphotorec.cpp" line="455"/>
<source>Add a raw disk image...</source>
<translation>加入一個原始磁碟影像...</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="458"/>
+ <location filename="src/qphotorec.cpp" line="461"/>
<source>PhotoRec is free software, and comes with ABSOLUTELY NO WARRANTY.</source>
<translation>PhotoRec 是自由軟體,並不提供任何擔保。</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="459"/>
+ <location filename="src/qphotorec.cpp" line="462"/>
<source>Please select a media to recover from</source>
<translation>請選擇需要還原的媒體</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="462"/>
+ <location filename="src/qphotorec.cpp" line="465"/>
<source>Disk capacity must be correctly detected for a successful recovery.
If a disk listed above has an incorrect size, check HD jumper settings and BIOS
detection, and install the latest OS patches and disk drivers.</source>
@@ -85,143 +85,143 @@ detection, and install the latest OS patches and disk drivers.</source>
並請安裝最近更新的作業系統修補包以及磁碟驅動程式。</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="469"/>
+ <location filename="src/qphotorec.cpp" line="472"/>
<source>Flags</source>
<translation>旗標</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="470"/>
+ <location filename="src/qphotorec.cpp" line="473"/>
<source>Type</source>
<translation>類型</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="471"/>
+ <location filename="src/qphotorec.cpp" line="474"/>
<source>File System</source>
<translation>檔案系統</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="472"/>
+ <location filename="src/qphotorec.cpp" line="475"/>
<source>Size</source>
<translation>大小</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="473"/>
+ <location filename="src/qphotorec.cpp" line="476"/>
<source>Label</source>
<translation>標籤</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="488"/>
+ <location filename="src/qphotorec.cpp" line="491"/>
<source>File System type</source>
<translation>檔案系統類型</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="489"/>
+ <location filename="src/qphotorec.cpp" line="492"/>
<source>ext2/ext3/ext4 filesystem</source>
<translation>ext2/ext3/ext4 檔案系統</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="490"/>
+ <location filename="src/qphotorec.cpp" line="493"/>
<source>FAT/NTFS/HFS+/ReiserFS/...</source>
<translation>FAT/NTFS/HFS+/ReiserFS/...</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="494"/>
+ <location filename="src/qphotorec.cpp" line="497"/>
<source>Free: Scan for file from unallocated space only</source>
<translation>空間:僅掃瞄未分配空間裡的檔案</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="495"/>
+ <location filename="src/qphotorec.cpp" line="498"/>
<source>Whole: Extract files from whole partition</source>
<translation>完整:從整個分割區內提取檔案</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="522"/>
+ <location filename="src/qphotorec.cpp" line="525"/>
<source>&amp;Browse</source>
<translation>瀏覽(&amp;B)</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="538"/>
+ <location filename="src/qphotorec.cpp" line="541"/>
<source>&amp;Search</source>
<translation>搜尋(&amp;S)</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="541"/>
+ <location filename="src/qphotorec.cpp" line="544"/>
<source>&amp;About</source>
<translation>關於(&amp;A)</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="542"/>
+ <location filename="src/qphotorec.cpp" line="545"/>
<source>&amp;File Formats</source>
<translation>檔案系統(&amp;F)</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="642"/>
+ <location filename="src/qphotorec.cpp" line="645"/>
<source>Destination:</source>
<translation>目的地:</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="647"/>
+ <location filename="src/qphotorec.cpp" line="650"/>
<source>Recovery completed</source>
<translation>完成還原</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="652"/>
+ <location filename="src/qphotorec.cpp" line="655"/>
<source>Bruteforce %1 sectors remaining (test %2)</source>
<translation>尚餘強力破解 %1 個磁區 (測試 %2)</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="660"/>
+ <location filename="src/qphotorec.cpp" line="663"/>
<source>Pass %1 - Reading sector %2/%3</source>
<translation>通過 %1 - 正在選取磁區 %2/%3</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="665"/>
+ <location filename="src/qphotorec.cpp" line="668"/>
<source>%1/10 headers found</source>
<translation>找到標願 %1/10</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="667"/>
+ <location filename="src/qphotorec.cpp" line="670"/>
<source>%1 files found</source>
<translation>找到 %1 個檔案</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="540"/>
- <location filename="src/qphotorec.cpp" line="762"/>
- <source>&amp;Quit</source>
- <translation>離開(&amp;Q)</translation>
- </message>
- <message>
- <location filename="src/qphotorec.cpp" line="750"/>
+ <location filename="src/qphotorec.cpp" line="753"/>
<source>File family</source>
<translation>檔案家族</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="751"/>
+ <location filename="src/qphotorec.cpp" line="543"/>
+ <location filename="src/qphotorec.cpp" line="765"/>
+ <source>&amp;Quit</source>
+ <translation>離開(&amp;Q)</translation>
+ </message>
+ <message>
+ <location filename="src/qphotorec.cpp" line="754"/>
<source>Number of files recovered</source>
<translation>完成還原的檔案數目</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="834"/>
+ <location filename="src/qphotorec.cpp" line="837"/>
<source>QPhotoRec: Failed to create file!</source>
<translation>QPhotoRec: 建立檔案失敗!</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="835"/>
+ <location filename="src/qphotorec.cpp" line="838"/>
<source>Failed to create file! Please choose another destination</source>
<translation>建立檔案失敗!請選取另一目的地</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="854"/>
+ <location filename="src/qphotorec.cpp" line="857"/>
<source>QPhotoRec: Not enough space!</source>
<translation>QPhotoRec: 空間不足!</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="855"/>
+ <location filename="src/qphotorec.cpp" line="858"/>
<source>There is not enough space left! Please free disk space and/or choose another destination</source>
<translation>磁碟空間不足!請騰出空間並/或選取另一目的地</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="924"/>
+ <location filename="src/qphotorec.cpp" line="927"/>
<source>QPhotoRec is is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
QPhotoRec is is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
@@ -234,24 +234,24 @@ You should have received a copy of the GNU General Public License along with QPh
您應該連同 QPhotoRec 取得 GNU 通用公共許可證 (GPL) 的複本,否則您可以參見&lt;http://www.gnu.org/licenses/&gt;。</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="925"/>
+ <location filename="src/qphotorec.cpp" line="928"/>
<source>QPhotoRec: About</source>
<translation>QPhotoRec: 關於</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="954"/>
+ <location filename="src/qphotorec.cpp" line="957"/>
<source>File Formats</source>
<translation>檔案格式</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="957"/>
+ <location filename="src/qphotorec.cpp" line="960"/>
<source>&amp;Reset</source>
<translation>重設(&amp;R)</translation>
</message>
<message>
- <location filename="src/qphotorec.cpp" line="958"/>
+ <location filename="src/qphotorec.cpp" line="961"/>
<source>Res&amp;tore</source>
<translation>還原(&amp;T)</translation>
</message>
</context>
-</TS>
+</TS> \ No newline at end of file
diff --git a/src/ntfs.c b/src/ntfs.c
index ee47e0a..1cbdeaa 100644
--- a/src/ntfs.c
+++ b/src/ntfs.c
@@ -184,7 +184,7 @@ int test_NTFS(const disk_t *disk_car, const struct ntfs_boot_sector*ntfs_header,
return 0;
}
-const ntfs_attribheader *ntfs_getattributeheaders(const ntfs_recordheader* record)
+static const ntfs_attribheader *ntfs_getattributeheaders(const ntfs_recordheader* record)
{
const char* location = (const char*)record;
if(le32(record->magic)!=NTFS_Magic ||
@@ -225,10 +225,12 @@ const ntfs_attribheader* ntfs_findattribute(const ntfs_recordheader* record, uin
return ntfs_searchattribute(attrib, attrType, end, 0);
}
-const ntfs_attribheader* ntfs_nextattribute(const ntfs_attribheader* attrib, uint32_t attrType, const char* end)
+#if 0
+static const ntfs_attribheader* ntfs_nextattribute(const ntfs_attribheader* attrib, uint32_t attrType, const char* end)
{
return ntfs_searchattribute(attrib, attrType, end, 1);
}
+#endif
const char* ntfs_getattributedata(const ntfs_attribresident* attrib, const char* end)
{
diff --git a/src/ntfs.h b/src/ntfs.h
index 353a7f3..faaa1ac 100644
--- a/src/ntfs.h
+++ b/src/ntfs.h
@@ -254,9 +254,7 @@ int test_NTFS(const disk_t *disk_car, const struct ntfs_boot_sector*ntfs_header,
#define NTFS_GETU64(p) (le64(*(const uint64_t*)(p)))
unsigned int ntfs_sector_size(const struct ntfs_boot_sector *ntfs_header);
int rebuild_NTFS_BS(disk_t *disk_car,partition_t *partition, const int verbose, const unsigned int expert, char**current_cmd);
-const ntfs_attribheader *ntfs_getattributeheaders(const ntfs_recordheader* record);
const ntfs_attribheader* ntfs_findattribute(const ntfs_recordheader* record, uint32_t attrType, const char* end);
-const ntfs_attribheader* ntfs_nextattribute(const ntfs_attribheader* attrib, uint32_t attrType, const char* end);
const char* ntfs_getattributedata(const ntfs_attribresident* attrib, const char* end);
long int ntfs_get_first_rl_element(const ntfs_attribnonresident *attrnr, const char* end);
diff --git a/src/ntfs_fix.c b/src/ntfs_fix.c
index e0157a2..37542a3 100644
--- a/src/ntfs_fix.c
+++ b/src/ntfs_fix.c
@@ -226,7 +226,7 @@ int repair_MFT(disk_t *disk_car, partition_t *partition, const int verbose, cons
{
/* Use MFT mirror */
#ifdef HAVE_NCURSES
- if(ask_confirmation("Fix MFT using its mirror ? (Y/N) - DANGEROUS NON REVERSIBLE OPERATION\nUse it ONLY IF Windows failed to access this filesystem.")!=0)
+ if(ask_confirmation("Fix MFT using its mirror ? (Y/N) - DANGEROUS NON REVERSIBLE OPERATION\nUse it ONLY IF TestDisk and Windows failed to access this filesystem.")!=0)
use_MFT=2;
else
#endif
diff --git a/src/partgpt.c b/src/partgpt.c
index 806ac75..025439d 100644
--- a/src/partgpt.c
+++ b/src/partgpt.c
@@ -38,8 +38,7 @@
#include <uuid.h>
#elif defined(HAVE_UUID_UUID_H)
#include <uuid/uuid.h>
-#endif
-#if defined(HAVE_SYS_UUID_H)
+#elif defined(HAVE_SYS_UUID_H)
#include <sys/uuid.h>
#endif
#include <assert.h>
@@ -78,6 +77,7 @@ static const char *get_gpt_typename(const efi_guid_t part_type_gpt);
const struct systypes_gtp gpt_sys_types[] = {
{ GPT_ENT_TYPE_EFI, "EFI System" },
+ { GPT_ENT_TYPE_EBP, "Extended Boot" },
{ GPT_ENT_TYPE_MBR, "MBR" },
{ GPT_ENT_TYPE_FREEBSD, "FreeBSD" },
{ GPT_ENT_TYPE_FREEBSD_SWAP, "FreeBSD Swap" },
@@ -90,6 +90,7 @@ const struct systypes_gtp gpt_sys_types[] = {
{ GPT_ENT_TYPE_MS_LDM_METADATA, "MS LDM MetaData" },
{ GPT_ENT_TYPE_MS_LDM_DATA, "MS LDM Data" },
{ GPT_ENT_TYPE_MS_RECOVERY, "Windows Recovery Env" },
+// { GPT_ENT_TYPE_LINUX_DATA
{ GPT_ENT_TYPE_LINUX_RAID, "Linux Raid" },
{ GPT_ENT_TYPE_LINUX_SWAP, "Linux Swap" },
{ GPT_ENT_TYPE_LINUX_LVM, "Linux LVM" },
@@ -99,6 +100,7 @@ const struct systypes_gtp gpt_sys_types[] = {
{ GPT_ENT_TYPE_LINUX_DATA, "Linux filesys. data" },
{ GPT_ENT_TYPE_HPUX_DATA, "HPUX Data" },
{ GPT_ENT_TYPE_HPUX_SERVICE, "HPUX Service" },
+ { GPT_ENT_TYPE_MAC_AFS, "Apple APFS" },
{ GPT_ENT_TYPE_MAC_HFS, "Mac HFS" },
{ GPT_ENT_TYPE_MAC_UFS, "Mac UFS" },
{ GPT_ENT_TYPE_MAC_RAID, "Mac Raid" },
@@ -511,6 +513,18 @@ static const char *get_gpt_typename(const efi_guid_t part_type_gpt)
for(i=0; gpt_sys_types[i].name!=NULL; i++)
if(guid_cmp(gpt_sys_types[i].part_type, part_type_gpt)==0)
return gpt_sys_types[i].name;
+ log_info("%8x %04x %04x %02x %02x %02x %02x %02x %02x %02x %02x\n",
+ part_type_gpt.time_low,
+ part_type_gpt.time_mid,
+ part_type_gpt.time_hi_and_version,
+ part_type_gpt.clock_seq_hi_and_reserved,
+ part_type_gpt.clock_seq_low,
+ part_type_gpt.node[0],
+ part_type_gpt.node[1],
+ part_type_gpt.node[2],
+ part_type_gpt.node[3],
+ part_type_gpt.node[4],
+ part_type_gpt.node[5]);
return NULL;
}
diff --git a/src/partgptn.c b/src/partgptn.c
index dbe320a..74b76ce 100644
--- a/src/partgptn.c
+++ b/src/partgptn.c
@@ -38,8 +38,7 @@
#include <uuid.h>
#elif defined(HAVE_UUID_UUID_H)
#include <uuid/uuid.h>
-#endif
-#if defined(HAVE_SYS_UUID_H)
+#elif defined(HAVE_SYS_UUID_H)
#include <sys/uuid.h>
#endif
#include "common.h"
diff --git a/src/partgptw.c b/src/partgptw.c
index 65cbaac..0621e1b 100644
--- a/src/partgptw.c
+++ b/src/partgptw.c
@@ -37,8 +37,7 @@
#include <uuid.h>
#elif defined(HAVE_UUID_UUID_H)
#include <uuid/uuid.h>
-#endif
-#if defined(HAVE_SYS_UUID_H)
+#elif defined(HAVE_SYS_UUID_H)
#include <sys/uuid.h>
#endif
#include "common.h"
diff --git a/src/parti386.c b/src/parti386.c
index 350a38b..2c334b1 100644
--- a/src/parti386.c
+++ b/src/parti386.c
@@ -199,6 +199,7 @@ static const struct systypes i386_sys_types[] = {
{0xe1, "SpeedStor FAT12 ext"},
{0xe3, "DOS RO"},
{0xe4, "SpeedStor FAT16 ext"},
+ {0xea, "Boot (BLS)"},
{P_BEOS, "BeFS"},
{0xee, "EFI GPT"}, /* Intel EFI GUID Partition Table */
{0xef, "EFI (FAT-12/16/32)"},/* Intel EFI System Partition */
diff --git a/src/phmain.c b/src/phmain.c
index 6a9c382..0949376 100644
--- a/src/phmain.c
+++ b/src/phmain.c
@@ -182,6 +182,10 @@ int main( int argc, char **argv )
}
logfile=argv[++i];
}
+ else if((strcmp(argv[i],"/nolog")==0) ||(strcmp(argv[i],"-nolog")==0))
+ {
+ create_log=TD_LOG_NONE;
+ }
else if((strcmp(argv[i],"/log")==0) ||(strcmp(argv[i],"-log")==0))
{
if(create_log==TD_LOG_NONE)
@@ -387,7 +391,7 @@ int main( int argc, char **argv )
printf("PhotoRec will try to restart itself using the sudo command to get\n");
printf("root (superuser) privileges.\n");
printf("\n");
- run_sudo(argc, argv);
+ run_sudo(argc, argv, create_log);
}
#endif
delete_list_disk(list_disk);
diff --git a/src/photorec.c b/src/photorec.c
index d8b0da1..f98ee43 100644
--- a/src/photorec.c
+++ b/src/photorec.c
@@ -510,6 +510,7 @@ void file_block_free(alloc_list_t *list_allocation)
{
alloc_list_t *allocated_space;
allocated_space=td_list_entry(tmp, alloc_list_t, list);
+ header_ignored_cond_reset(allocated_space->start, allocated_space->end);
free_list_allocation_end=allocated_space->end;
td_list_del(tmp);
free(allocated_space);
diff --git a/src/qphotorec_locale.qrc b/src/qphotorec_locale.qrc
index 409ab01..f838120 100644
--- a/src/qphotorec_locale.qrc
+++ b/src/qphotorec_locale.qrc
@@ -1,11 +1,14 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource prefix="/">
<file>lang/qphotorec.ca.qm</file>
+<file>lang/qphotorec.cs.qm</file>
<file>lang/qphotorec.es.qm</file>
<file>lang/qphotorec.fr.qm</file>
<file>lang/qphotorec.it.qm</file>
+<file>lang/qphotorec.ja.qm</file>
<file>lang/qphotorec.pt.qm</file>
<file>lang/qphotorec.ru.qm</file>
+<file>lang/qphotorec.tr.qm</file>
<file>lang/qphotorec.zh_TW.qm</file>
</qresource>
</RCC>
diff --git a/src/sudo.c b/src/sudo.c
index 5f346ba..245b006 100644
--- a/src/sudo.c
+++ b/src/sudo.c
@@ -38,16 +38,28 @@
#include "types.h"
#include "common.h"
#include "sudo.h"
+#include "log.h"
-void run_sudo(int argc, char **argv)
+void run_sudo(const int argc, char **argv, const int create_log)
{
- int i;
char **argv2;
- argv2 = (char **)MALLOC(sizeof(char *) * (argc + 2));
- argv2[0]=strdup(SUDO_BIN);
- for (i=0; i < argc; i++)
- argv2[i+1] = argv[i];
- argv2[i+1]=NULL;
+ if(argc==1)
+ {
+ argv2 = (char **)MALLOC(sizeof(char *) * 4);
+ argv2[0] = strdup(SUDO_BIN);
+ argv2[1] = argv[0];
+ argv2[2] = strdup(create_log==TD_LOG_NONE?"/nolog":"/debug");
+ argv2[3] = NULL;
+ }
+ else
+ {
+ int i;
+ argv2 = (char **)MALLOC(sizeof(char *) * (argc + 2));
+ argv2[0]=strdup(SUDO_BIN);
+ for (i=0; i < argc; i++)
+ argv2[i+1] = argv[i];
+ argv2[i+1]=NULL;
+ }
printf("sudo may ask your user password, it doesn't ask for the root password.\n");
printf("Usually there is no echo or '*' displayed when you type your password.\n");
printf("\n");
diff --git a/src/sudo.h b/src/sudo.h
index fce6f3c..d16ee66 100644
--- a/src/sudo.h
+++ b/src/sudo.h
@@ -23,7 +23,7 @@
#ifdef __cplusplus
extern "C" {
#endif
-void run_sudo(int argc, char **argv);
+void run_sudo(const int argc, char **argv, const int create_log);
#ifdef __cplusplus
} /* closing brace for extern "C" */
#endif
diff --git a/src/testdisk.c b/src/testdisk.c
index 891833a..4317cc7 100644
--- a/src/testdisk.c
+++ b/src/testdisk.c
@@ -43,9 +43,7 @@
#include "types.h"
#include "common.h"
#include "intrf.h"
-#ifdef HAVE_NCURSES
#include "intrfn.h"
-#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
@@ -259,6 +257,10 @@ int main( int argc, char **argv )
}
logfile=argv[++i];
}
+ else if((strcmp(argv[i],"/nolog")==0) ||(strcmp(argv[i],"-nolog")==0))
+ {
+ create_log=TD_LOG_NONE;
+ }
else if((strcmp(argv[i],"/log")==0) ||(strcmp(argv[i],"-log")==0))
{
if(create_log==TD_LOG_NONE)
@@ -515,7 +517,7 @@ int main( int argc, char **argv )
printf("TestDisk will try to restart itself using the sudo command to get\n");
printf("root (superuser) privileges.\n");
printf("\n");
- run_sudo(argc, argv);
+ run_sudo(argc, argv, create_log);
}
#endif
return 0;
diff --git a/src/tpartwr.c b/src/tpartwr.c
index d6c3d43..0eece16 100644
--- a/src/tpartwr.c
+++ b/src/tpartwr.c
@@ -84,9 +84,14 @@ int interface_write(disk_t *disk_car,list_part_t *list_part,const int can_search
}
else
{
+ char options[10];
+ options[0]='R';
+ options[1]=0;
+ if(can_search_deeper)
+ strcat(options,"S");
log_flush();
#ifdef HAVE_NCURSES
- command=screen_buffer_display_ext(stdscr,(can_search_deeper?"S":""),menuWrite,menu);
+ command=screen_buffer_display_ext(stdscr, options, menuWrite,menu);
#endif
}
}