src/file_ext.c: fix Array-bounds issue

See bug report: https://github.com/cgsecurity/testdisk/issues/104
Thanks to Daniil Frolov for reporting the problem.
This commit is contained in:
Christophe Grenier 2022-08-11 16:03:41 +02:00
parent 97f517280d
commit 0ae7969c12

View file

@ -53,7 +53,7 @@ const file_hint_t file_hint_ext2_sb= {
@*/
static void file_rename_ext(file_recovery_t *file_recovery)
{
unsigned char buffer[512];
unsigned char buffer[1024];
char buffer_cluster[32];
FILE *file;
const struct ext2_super_block *sb=(const struct ext2_super_block *)&buffer;