aboutsummaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2012-07-03 14:47:57 -0700
committerBrian Behlendorf <[email protected]>2012-07-03 15:14:34 -0700
commit42d3b990cfba9906e25bbf6b60e96389244f8082 (patch)
tree84d254408b06ff8c876aa94879d988d835c5bbc2 /module
parentfa881d4addb7baa44c69350b91bdf0503221d7af (diff)
Update incorrect ddt_zap_lookup() assertion
When the ddt_zap_lookup() function was updated to dynamically allocate memory for the cbuf variable, to save stack space, the 'csize <= sizeof (cbuf)' assertion was not updated. The result of this was that the size of the pointer was being used in the comparison rather than the buffer size. Signed-off-by: Brian Behlendorf <[email protected]> Signed-off-by: Prakash Surya <[email protected]>
Diffstat (limited to 'module')
-rw-r--r--module/zfs/ddt_zap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/ddt_zap.c b/module/zfs/ddt_zap.c
index 280bff35a..6fb6ea2a3 100644
--- a/module/zfs/ddt_zap.c
+++ b/module/zfs/ddt_zap.c
@@ -70,7 +70,7 @@ ddt_zap_lookup(objset_t *os, uint64_t object, ddt_entry_t *dde)
goto out;
ASSERT(one == 1);
- ASSERT(csize <= sizeof (cbuf));
+ ASSERT(csize <= (sizeof (dde->dde_phys) + 1));
error = zap_lookup_uint64(os, object, (uint64_t *)&dde->dde_key,
DDT_KEY_WORDS, 1, csize, cbuf);