From 4389ae9ca0ceed6c56d315c57ac1e8590ab7f699 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Thu, 6 Aug 2020 12:55:33 +0200 Subject: [PATCH] vfs_fruit: ensure the buffer passed to file_lines_parse() is 0-terminated Otherwise valgrind complains... Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- source3/modules/vfs_fruit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index 451b07d686b..8340a878123 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -4755,7 +4755,9 @@ static bool fruit_get_bandsize(vfs_handle_struct *handle, goto out; } - file_data = talloc_array(talloc_tos(), uint8_t, plist_file_size); + file_data = talloc_zero_array(talloc_tos(), + uint8_t, + plist_file_size + 1); if (file_data == NULL) { ok = false; goto out;