summaryrefslogtreecommitdiff
path: root/Cryptlib/Base.h
diff options
context:
space:
mode:
authorMichał Żygowski <michal.zygowski@3mdeb.com>2023-12-16 13:01:29 +0100
committerPeter Jones <pjones@redhat.com>2025-01-21 11:00:49 -0500
commitd6076cb61297c13a0c55c0b848b85b9f31a912ac (patch)
tree911ae9de25ad2265f7e32e9a2c1391088e958a35 /Cryptlib/Base.h
parent9415d3cada09f8043bb9a2c1b32fd1f909cefab0 (diff)
downloadefi-boot-shim-d6076cb61297c13a0c55c0b848b85b9f31a912ac.tar.gz
efi-boot-shim-d6076cb61297c13a0c55c0b848b85b9f31a912ac.zip
simple_file: Use second variable to create filesystem entries
If HandleProtocol or OpenVolume fails, the entries array will become non-contiguous, i.e. will have NULL pointers between valid volume names in the array. Because of that count_lines may return a lower number of entries than expected. As a result one may not browse all valid filesystems in the file explorer. Add a second index variable that will increment only on successfully created filesystem entries. As a result, count_lines should return proper length and there won't be any lost partitions or accesses to invalid entries. Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Diffstat (limited to 'Cryptlib/Base.h')
0 files changed, 0 insertions, 0 deletions