From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay.sgi.com (relay2.corp.sgi.com [137.38.102.29]) by oss.sgi.com (Postfix) with ESMTP id 3EC547F62 for ; Sun, 2 Aug 2015 12:32:12 -0500 (CDT) Received: from cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by relay2.corp.sgi.com (Postfix) with ESMTP id 24DC9304064 for ; Sun, 2 Aug 2015 10:32:08 -0700 (PDT) Received: from sandeen.net (sandeen.net [63.231.237.45]) by cuda.sgi.com with ESMTP id 5PE2jk2DLGVOJUBO for ; Sun, 02 Aug 2015 10:32:06 -0700 (PDT) Message-ID: <55BE5413.4070106@sandeen.net> Date: Sun, 02 Aug 2015 10:32:03 -0700 From: Eric Sandeen MIME-Version: 1.0 Subject: [PATCH] xfs_repair: Fix malloc size of rt_ext_tree_ptr (harmless) References: <55BC60D7.4020102@redhat.com> In-Reply-To: <55BC60D7.4020102@redhat.com> List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: xfs-bounces@oss.sgi.com Sender: xfs-bounces@oss.sgi.com To: Eric Sandeen , xfs-oss rt_ext_tree_ptr points to an avl64tree_desc_t, but we malloc memory according to the size of avltree_desc_t. Oddly, the latter happens to be larger, so we're ok, but may as well make it correct. Addresses-Coverity-Id: 1297533 Signed-off-by: Eric Sandeen --- (sorry, missed [PATCH] on the first one, durrr...) Hm, I thought I sent this already, but don't see it on the list. diff --git a/repair/incore_ext.c b/repair/incore_ext.c index 826bf44..6611d5c 100644 --- a/repair/incore_ext.c +++ b/repair/incore_ext.c @@ -783,7 +783,7 @@ incore_ext_init(xfs_mount_t *mp) avl_init_tree(extent_bcnt_ptrs[i], &avl_extent_bcnt_tree_ops); } - if ((rt_ext_tree_ptr = malloc(sizeof(avltree_desc_t))) == NULL) + if ((rt_ext_tree_ptr = malloc(sizeof(avl64tree_desc_t))) == NULL) do_error(_("couldn't malloc dup rt extent tree descriptor\n")); avl64_init_tree(rt_ext_tree_ptr, &avl64_extent_tree_ops); _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs