From 8fec35994c8b880c681f14291194763759e1c24d Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 7 Jul 2015 09:04:22 +0200 Subject: [PATCH] vfs_fruit: Fix CID 1311244 Out-of-bounds read MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit We should not call memcpy if the offset is exactly AFP_INFO_SIZE Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme Autobuild-User(master): Ralph Böhme Autobuild-Date(master): Tue Jul 7 14:04:39 CEST 2015 on sn-devel-104 --- source3/modules/vfs_fruit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index d05d7868d31..e29440b7243 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -2624,7 +2624,7 @@ static ssize_t fruit_pread(vfs_handle_struct *handle, char afpinfo_buf[AFP_INFO_SIZE]; size_t to_return; - if ((offset < 0) || (offset > AFP_INFO_SIZE)) { + if ((offset < 0) || (offset >= AFP_INFO_SIZE)) { len = 0; rc = 0; goto exit; -- 2.47.3