Field name_len has type CHAR8, while filename limit is 255 (EXT4_NAME_MAX), so because structure EXT4_DIR_ENTRY would be unchangeable in future, we could drop this check without any assertions
Cc: Marvin Häuser <mhaeu...@posteo.de> Cc: Pedro Falcato <pedro.falc...@gmail.com> Cc: Vitaly Cheptsov <vit9...@protonmail.com> Signed-off-by: Savva Mitrofanov <savva...@gmail.com> --- Features/Ext4Pkg/Ext4Dxe/Directory.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/Features/Ext4Pkg/Ext4Dxe/Directory.c b/Features/Ext4Pkg/Ext4Dxe/Directory.c index 682f66ad5525..96c84c24243e 100644 --- a/Features/Ext4Pkg/Ext4Dxe/Directory.c +++ b/Features/Ext4Pkg/Ext4Dxe/Directory.c @@ -160,17 +160,6 @@ Ext4RetrieveDirent ( return EFI_VOLUME_CORRUPTED; } - // Ignore names bigger than our limit. - - /* Note: I think having a limit is sane because: - 1) It's nicer to work with. - 2) Linux and a number of BSDs also have a filename limit of 255. - */ - if (Entry->name_len > EXT4_NAME_MAX) { - BlockOffset += Entry->rec_len; - continue; - } - // Unused entry if (Entry->inode == 0) { BlockOffset += Entry->rec_len; -- 2.37.0 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#91652): https://edk2.groups.io/g/devel/message/91652 Mute This Topic: https://groups.io/mt/92531468/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-