add warning for afl-showmap partial read

This commit is contained in:
vanhauser-thc
2021-05-17 13:11:16 +02:00
parent 738246465d
commit a3fffac90c

View File

@ -386,7 +386,18 @@ static u32 read_file(u8 *in_file) {
} }
in_len = st.st_size > MAX_FILE ? MAX_FILE : st.st_size; if (st.st_size > MAX_FILE) {
WARNF("Input file '%s' is too large, only reading %u bytes.", in_file,
MAX_FILE);
in_len = MAX_FILE;
} else {
in_len = st.st_size;
}
in_data = ck_alloc_nozero(in_len); in_data = ck_alloc_nozero(in_len);
ck_read(fd, in_data, in_len, in_file); ck_read(fd, in_data, in_len, in_file);