]> granicus.if.org Git - zfs/commitdiff
Fix zap_lookup() in feature_is_supported().
authorTim Chase <tim@chase2k.com>
Mon, 24 Feb 2014 19:42:36 +0000 (13:42 -0600)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 4 Mar 2014 19:44:44 +0000 (11:44 -0800)
The length (number of integers) argument passed to zap_lookup was wrong;
likely as a result of performing stack-reduction on the function.

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Richard Yao <ryao@gentoo.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #2141

module/zfs/zfeature.c

index ccd7cb92eab0bee759601588bc6831d96d835c7e..4f4785a0c82a1ec04e62d5857fbff699cc9b4b21 100644 (file)
@@ -204,7 +204,7 @@ feature_is_supported(objset_t *os, uint64_t obj, uint64_t desc_obj,
                                char *desc = "";
 
                                if (zap_lookup(os, desc_obj, za->za_name,
-                                   1, sizeof (buf), buf) == 0)
+                                   1, MAXPATHLEN, buf) == 0)
                                        desc = buf;
 
                                VERIFY(nvlist_add_string(unsup_feat,