summaryrefslogtreecommitdiffstats
path: root/src/file_gz.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2009-10-25 18:26:16 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2009-10-25 18:26:16 +0100
commit5156d5b462f00da3830dc6314dd74feda37f1257 (patch)
tree85ff8a96aeab5a1cdd6054f6be8a53d12d401788 /src/file_gz.c
parent4a75ec8effe3e4878e7710a1322d8ed86f059c08 (diff)
Code cleanup
Diffstat (limited to 'src/file_gz.c')
-rw-r--r--src/file_gz.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/file_gz.c b/src/file_gz.c
index f26c1bc..3893ca5 100644
--- a/src/file_gz.c
+++ b/src/file_gz.c
@@ -72,7 +72,7 @@ static void register_header_check_gz(file_stat_t *file_stat)
static int header_check_gz(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 const unsigned char tar_header_posix[8] = { 'u','s','t','a','r',' ',' ',0x00};
- static const unsigned char xournal_header[0x2d] = {
+ static const unsigned char xournal_header[0x2e] = {
'<', '?', 'x', 'm', 'l', ' ', 'v', 'e',
'r', 's', 'i', 'o', 'n', '=', '"', '1',
'.', '0', '"', ' ', 's', 't', 'a', 'n',
@@ -232,7 +232,6 @@ static void file_rename_gz(const char *old_filename)
unsigned char buffer[512];
FILE *file;
int buffer_size;
- int off=10;
if((file=fopen(old_filename, "rb"))==NULL)
return;
buffer_size=fread(buffer, 1, sizeof(buffer), file);
@@ -243,6 +242,7 @@ static void file_rename_gz(const char *old_filename)
return ;
{
const unsigned int flags=buffer[3];
+ int off=10;
if((flags&GZ_FEXTRA)!=0)
{
off+=2;