From 97abd760ab823f5fc713815c25bcd417a5ccf74a Mon Sep 17 00:00:00 2001 From: alex Date: Sat, 3 Oct 2009 19:26:24 +0000 Subject: [PATCH] - dmu osd: don't allow too long names --- lustre/dmu-osd/udmu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lustre/dmu-osd/udmu.c b/lustre/dmu-osd/udmu.c index 120ce17..1503f58 100644 --- a/lustre/dmu-osd/udmu.c +++ b/lustre/dmu-osd/udmu.c @@ -439,6 +439,8 @@ int udmu_zap_lookup(udmu_objset_t *uos, dmu_buf_t *zap_db, const char *name, uint64_t oid; oid = zap_db->db_object; + if (strlen(name) >= MAXNAMELEN) + return EOVERFLOW; /* * value_size should be a multiple of intsize. * intsize is 8 for micro ZAP and 1, 2, 4 or 8 for a fat ZAP. -- 1.8.3.1