From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb0-f176.google.com ([209.85.213.176]:34815 "EHLO mail-yb0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756621AbdDGVRm (ORCPT ); Fri, 7 Apr 2017 17:17:42 -0400 Received: by mail-yb0-f176.google.com with SMTP id m133so19897869ybb.1 for ; Fri, 07 Apr 2017 14:17:42 -0700 (PDT) From: Martin Brandenburg To: hubcap@omnibond.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Martin Brandenburg Subject: [PATCH 02/10] orangefs: fix bounds check for listxattr Date: Fri, 7 Apr 2017 17:17:04 -0400 Message-Id: <1491599832-17773-3-git-send-email-martin@omnibond.com> In-Reply-To: <1491599832-17773-1-git-send-email-martin@omnibond.com> References: <1491599832-17773-1-git-send-email-martin@omnibond.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Signed-off-by: Martin Brandenburg --- fs/orangefs/xattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/orangefs/xattr.c b/fs/orangefs/xattr.c index 74a81b1..fba4db7 100644 --- a/fs/orangefs/xattr.c +++ b/fs/orangefs/xattr.c @@ -358,7 +358,7 @@ ssize_t orangefs_listxattr(struct dentry *dentry, char *buffer, size_t size) returned_count = new_op->downcall.resp.listxattr.returned_count; if (returned_count < 0 || - returned_count >= ORANGEFS_MAX_XATTR_LISTLEN) { + returned_count > ORANGEFS_MAX_XATTR_LISTLEN) { gossip_err("%s: impossible value for returned_count:%d:\n", __func__, returned_count); -- 2.1.4