summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2017-09-11 21:01:18 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2017-09-11 21:01:18 +0200
commit459910741707b88608fec5c8164a5c05c53528b7 (patch)
tree29dd8993c5172a18e5d7ccebb95701b0d885e18f /src
parent29ce5d3adebbcba9fb6cf0aa341f9d1506c81fc9 (diff)
add assert() in file_rsearch()
Diffstat (limited to 'src')
-rw-r--r--src/filegen.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/filegen.c b/src/filegen.c
index 919b918..9568543 100644
--- a/src/filegen.c
+++ b/src/filegen.c
@@ -198,6 +198,7 @@ void file_allow_nl(file_recovery_t *file_recovery, const unsigned int nl_mode)
uint64_t file_rsearch(FILE *handle, uint64_t offset, const void*footer, const unsigned int footer_length)
{
unsigned char*buffer;
+ assert(footer_length < 4096);
buffer=(unsigned char*)MALLOC(4096+footer_length-1);
memset(buffer+4096,0,footer_length-1);
do