summaryrefslogtreecommitdiffstats
path: root/src/file_ace.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_ace.c
parent65543b032a3f3978f46add944c050d30e2d1a400 (diff)
PhotoRec: avoid potential endless loops
Diffstat (limited to 'src/file_ace.c')
-rw-r--r--src/file_ace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/file_ace.c b/src/file_ace.c
index 337155a..582e6ca 100644
--- a/src/file_ace.c
+++ b/src/file_ace.c
@@ -155,7 +155,7 @@ static void file_check_ace(file_recovery_t *file_recovery)
}
/* Add its header size */
- file_recovery->file_size += 2U + 2 + le16(h.size); /* +2: CRC16, +2: size */
+ file_recovery->file_size += (uint64_t)4 + le16(h.size); /* +2: CRC16, +2: size */
/* If addsize flag, add complementary size */
if (le16(h.flags)&1)
{