summaryrefslogtreecommitdiffstats
path: root/src/file_xm.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2017-09-12 13:16:15 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2017-09-12 13:16:15 +0200
commitb75c2fca2a39cea956efff127c345c00e99486f0 (patch)
treede23d458cffe11c9568621c64b4815291fe3f0ba /src/file_xm.c
parent65543b032a3f3978f46add944c050d30e2d1a400 (diff)
PhotoRec: avoid potential endless loops
Diffstat (limited to 'src/file_xm.c')
-rw-r--r--src/file_xm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/file_xm.c b/src/file_xm.c
index cab9b96..8a32d96 100644
--- a/src/file_xm.c
+++ b/src/file_xm.c
@@ -71,7 +71,7 @@ static int parse_patterns(file_recovery_t *fr, uint16_t patterns)
if (fseek(fr->handle, data_size, SEEK_CUR) == -1)
return -1;
- fr->file_size += header_size+data_size;
+ fr->file_size += (uint64_t)header_size+data_size;
}
return 0;
}
@@ -130,7 +130,7 @@ static int parse_instruments(file_recovery_t *fr, uint16_t instrs)
if (fseek(fr->handle, 36+size, SEEK_CUR) == -1)
return -1;
- fr->file_size += 40+size;
+ fr->file_size += (uint64_t)40+size;
}
}
/* No sample, account for garbage */