* xfs_repair: Fix malloc size of rt_ext_tree_ptr (harmless)
@ 2015-08-01 6:01 Eric Sandeen
2015-08-02 17:32 ` [PATCH] " Eric Sandeen
0 siblings, 1 reply; 2+ messages in thread
From: Eric Sandeen @ 2015-08-01 6:01 UTC (permalink / raw)
To: 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 <sandeen@redhat.com>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] xfs_repair: Fix malloc size of rt_ext_tree_ptr (harmless)
2015-08-01 6:01 xfs_repair: Fix malloc size of rt_ext_tree_ptr (harmless) Eric Sandeen
@ 2015-08-02 17:32 ` Eric Sandeen
0 siblings, 0 replies; 2+ messages in thread
From: Eric Sandeen @ 2015-08-02 17:32 UTC (permalink / raw)
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 <sandeen@redhat.com>
---
(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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-02 17:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-01 6:01 xfs_repair: Fix malloc size of rt_ext_tree_ptr (harmless) Eric Sandeen
2015-08-02 17:32 ` [PATCH] " Eric Sandeen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox