mirror of
https://github.com/CTCaer/hekate
synced 2024-09-07 00:29:00 +00:00
nyx: Check for huge files in part manager backup
This commit is contained in:
parent
9afc6f0a4e
commit
6159284be6
|
@ -126,6 +126,11 @@ static int _backup_and_restore_files(char *path, u32 *total_files, u32 *total_si
|
||||||
if (!(fno.fattrib & AM_DIR))
|
if (!(fno.fattrib & AM_DIR))
|
||||||
{
|
{
|
||||||
u32 file_size = fno.fsize > RAMDISK_CLUSTER_SZ ? fno.fsize : RAMDISK_CLUSTER_SZ; // Ramdisk cluster size.
|
u32 file_size = fno.fsize > RAMDISK_CLUSTER_SZ ? fno.fsize : RAMDISK_CLUSTER_SZ; // Ramdisk cluster size.
|
||||||
|
|
||||||
|
// Check for overflow.
|
||||||
|
if ((file_size + *total_size) < *total_size)
|
||||||
|
break;
|
||||||
|
|
||||||
*total_size += file_size;
|
*total_size += file_size;
|
||||||
*total_files += 1;
|
*total_files += 1;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue