From b96bc9fa260c397887ba6199181f3b8bca7046a6 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 26 Mar 2013 16:38:00 -0700 Subject: Fix bug #9130 - Certain xattrs cause Windows error 0x800700FF Ensure ntvfs server never returns zero length EA's. Signed-off-by: Jeremy Allison Reviewed-by: David Disseldorp --- source4/ntvfs/posix/pvfs_qfileinfo.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source4/ntvfs/posix') diff --git a/source4/ntvfs/posix/pvfs_qfileinfo.c b/source4/ntvfs/posix/pvfs_qfileinfo.c index ac3e6a65f5..33ff9ce3cb 100644 --- a/source4/ntvfs/posix/pvfs_qfileinfo.c +++ b/source4/ntvfs/posix/pvfs_qfileinfo.c @@ -102,6 +102,9 @@ NTSTATUS pvfs_query_ea_list(struct pvfs_state *pvfs, TALLOC_CTX *mem_ctx, for (j=0;jnum_eas;j++) { if (strcasecmp_m(eas->eas[i].name.s, ealist->eas[j].name) == 0) { + if (ealist->eas[j].value.length == 0) { + continue; + } eas->eas[i].value = ealist->eas[j].value; break; } @@ -134,6 +137,9 @@ static NTSTATUS pvfs_query_all_eas(struct pvfs_state *pvfs, TALLOC_CTX *mem_ctx, for (i=0;inum_eas;i++) { eas->eas[eas->num_eas].flags = 0; eas->eas[eas->num_eas].name.s = ealist->eas[i].name; + if (ealist->eas[i].value.length == 0) { + continue; + } eas->eas[eas->num_eas].value = ealist->eas[i].value; eas->num_eas++; } -- cgit