Fix memory leaks in grub_squash_iterate_dir.
Fixes: 20dd511c8(Handle "." and ".." on squashfs.)
Signed-off-by: "t.feng"
---
grub-core/fs/squash4.c | 20
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/grub-core/fs/squash4.c b/grub-core/fs/squash4.c
index 02b1
Fix memory leaks in grub_ntfs_read_symlink.
Fixes: 5773fb641(Support NTFS reparse points.)
Signed-off-by: "t.feng"
---
grub-core/fs/ntfs.c | 26 ++
1 file changed, 22 insertions(+), 4 deletions(-)
diff --git a/grub-core/fs/ntfs.c b/grub-core/fs/ntfs.c
index 3511e4e2c..e
Hi all,
I am doing code review in grub-core/fs module and I found some
memory leaks.
*
t.feng (9):
fs/affs:Fix memory leaks in grub_affs_create_node
fs/btrfs: Fix memory leak in find_path
fs/minix: Fix memory leak in grub_minix_lookup_symlink
fs/ntfs: Fix memory le
Fix memory leaks in xfs.
Signed-off-by: "t.feng"
---
grub-core/fs/xfs.c | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/grub-core/fs/xfs.c b/grub-core/fs/xfs.c
index d6de7f1a2..b67407690 100644
--- a/grub-core/fs/xfs.c
+++ b/grub-core/fs/xfs.c
@@ -585,7 +585,10 @@
Fix memory leak in grub_iso9660_susp_iterate.
Fixes: 99373ce47(iso9660.c: Remove nested functions.)
Signed-off-by: "t.feng"
---
grub-core/fs/iso9660.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/grub-core/fs/iso9660.c b/grub-core/fs/iso9660.c
index 91817ec1f..
Fix memory leaks in read_bfs_file.
l1_entries and l2_entries are forgotten to be freed if
end of reading file.
Fixes: 5825b3794(BFS implementation based on the specification.)
Signed-off-by: "t.feng"
---
grub-core/fs/bfs.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/grub-core/fs/bfs.c
hashtable is unfreed in case GRUB_AFFS_FILETYPE_HARDLINK if
grub_disk_read failed. Because, if grub_affs_create_node
return not zero, the hashtable should be freed.
By the way hashtable is unused in grub_affs_create_node, so we can
remove the parameter and take care of it in grub_affs_iterate_dir.
Fix memory leaks in grub_minix_lookup_symlink.
Fixes: a07e6ad01(Remove variable length arrays)
Signed-off-by: "t.feng"
---
grub-core/fs/minix.c | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/grub-core/fs/minix.c b/grub-core/fs/minix.c
index 953df1191..2176b6e93
Fix memory leak in grub_hfsplus_btree_search.
Fixes: 58ea11d5b(Don't fetch a key beyond the end of the node)
Signed-off-by: "t.feng"
---
grub-core/fs/hfsplus.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/grub-core/fs/hfsplus.c b/grub-core/fs/hfsplus.c
index 6337cbfcb
Fix memory leak in find_path.
Fixs: 82591fa6e(Make / in btrfe refer to real root)
Signed-off-by: "t.feng"
---
grub-core/fs/btrfs.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c
index ec72f7be3..19bff4610 100644
--- a/grub-c
Hi,
on Sat, 19 Nov 2022 18:39:44 +0800, t.feng via Grub-devel wrote:
> Fix memory leak in grub_iso9660_susp_iterate.
>
> Fixes: 99373ce47(iso9660.c: Remove nested functions.)
>
> Signed-off-by: "t.feng"
Reviewed-by: Thomas Schmitt
Have a nice day :)
Thomas
_
Hi,
(Cc-ing t.feng in the hope that this issue can become part of the code
review.)
While reviewing "[PATCH 7/9]" by t.feng, i wonder whether there is a bug
in grub_iso9660_susp_iterate() in regard to the end of the SUSP data:
for (entry = (struct grub_iso9660_susp_entry *) sua; (char *) entry
Hi,
i wrote:
> I think the loop end condition should use 4 rather than 1:
> (char *) entry < (char *) sua + sua_size - 4 && entry->len > 0
Urm ... better "3 rather than 1":
(char *) entry < (char *) sua + sua_size - 3 && entry->len > 0
The memory fault by entry->len will appear if
13 matches
Mail list logo