* [PATCH] hpfs: Initialize memory in `hfs_find_init`
@ 2025-09-27 7:28 Javier Garcia
0 siblings, 0 replies; only message in thread
From: Javier Garcia @ 2025-09-27 7:28 UTC (permalink / raw)
To: slava, glaubitz, frank.li
Cc: linux-fsdevel, linux-kernel, shuah, Javier Garcia,
syzbot+e126b819d8187b282d44
Avoid the use of uninit-value in `hfsplys_strcasecmp` and `case_fold`.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Reported-and-tested-by: syzbot+e126b819d8187b282d44@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=e126b819d8187b282d44
Signed-off-by: Javier Garcia <rampxxxx@gmail.com>
---
fs/hfsplus/bfind.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/hfsplus/bfind.c b/fs/hfsplus/bfind.c
index 901e83d65d20..75f1c029c2ed 100644
--- a/fs/hfsplus/bfind.c
+++ b/fs/hfsplus/bfind.c
@@ -18,7 +18,7 @@ int hfs_find_init(struct hfs_btree *tree, struct hfs_find_data *fd)
fd->tree = tree;
fd->bnode = NULL;
- ptr = kmalloc(tree->max_key_len * 2 + 4, GFP_KERNEL);
+ ptr = kzalloc(tree->max_key_len * 2 + 4, GFP_KERNEL);
if (!ptr)
return -ENOMEM;
fd->search_key = ptr;
--
2.50.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2025-09-27 7:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-27 7:28 [PATCH] hpfs: Initialize memory in `hfs_find_init` Javier Garcia
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).