]> git.ipfire.org Git - thirdparty/grub.git/commit
fs/ntfs: Use a helper function to access attributes
authorB Horn <b@horn.uk>
Tue, 14 May 2024 11:39:56 +0000 (12:39 +0100)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 23 Jan 2025 15:22:46 +0000 (16:22 +0100)
commit048777bc29043403d077d41a81d0183767b8bc71
treecbc14ec465d6cede84f5d32d8e5a04d3dc4a859f
parent237a71184a32d1ef7732f5f49ed6a89c5fe1c99a
fs/ntfs: Use a helper function to access attributes

Right now to access the next attribute the code reads the length of the
current attribute and adds that to the current pointer. This is error
prone as bounds checking needs to be performed all over the place. So,
implement a helper and ensure its used across find_attr() and read_attr().

This commit does *not* implement full bounds checking. It is just the
preparation work for this to be added into the helper.

Signed-off-by: B Horn <b@horn.uk>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/fs/ntfs.c
include/grub/ntfs.h