summaryrefslogtreecommitdiffstats
path: root/src/file_bld.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_bld.c
parent65543b032a3f3978f46add944c050d30e2d1a400 (diff)
PhotoRec: avoid potential endless loops
Diffstat (limited to 'src/file_bld.c')
-rw-r--r--src/file_bld.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/file_bld.c b/src/file_bld.c
index 6ccf74c..3fc5b26 100644
--- a/src/file_bld.c
+++ b/src/file_bld.c
@@ -63,7 +63,7 @@ static data_check_t data_check_blend4le(const unsigned char *buffer, const unsig
file_recovery->calculated_file_size+=0x14;
return DC_STOP;
}
- file_recovery->calculated_file_size+=0x14+len;
+ file_recovery->calculated_file_size+=(uint64_t)0x14+len;
}
return DC_CONTINUE;
}
@@ -86,7 +86,7 @@ static data_check_t data_check_blend8le(const unsigned char *buffer, const unsig
file_recovery->calculated_file_size+=0x18;
return DC_STOP;
}
- file_recovery->calculated_file_size+=0x18+len;
+ file_recovery->calculated_file_size+=(uint64_t)0x18+len;
}
return DC_CONTINUE;
}
@@ -109,7 +109,7 @@ static data_check_t data_check_blend4be(const unsigned char *buffer, const unsig
file_recovery->calculated_file_size+=0x14;
return DC_STOP;
}
- file_recovery->calculated_file_size+=0x14+len;
+ file_recovery->calculated_file_size+=(uint64_t)0x14+len;
}
return DC_CONTINUE;
}
@@ -132,7 +132,7 @@ static data_check_t data_check_blend8be(const unsigned char *buffer, const unsig
file_recovery->calculated_file_size+=0x18;
return DC_STOP;
}
- file_recovery->calculated_file_size+=0x18+len;
+ file_recovery->calculated_file_size+=(uint64_t)0x18+len;
}
return DC_CONTINUE;
}