summaryrefslogtreecommitdiff
path: root/source3/smbd/trans2.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2013-03-26 16:37:22 -0700
committerDavid Disseldorp <ddiss@samba.org>2013-04-02 20:06:38 +0200
commit875bedddddc51df59f85ae7bbd7db52fbfb5ffef (patch)
tree732bb6c545392c22e3550ae9f1e7220c915b7508 /source3/smbd/trans2.c
parent15fa043b7d362ee197835c0a72a936684c774472 (diff)
downloadsamba-875bedddddc51df59f85ae7bbd7db52fbfb5ffef.tar.gz
samba-875bedddddc51df59f85ae7bbd7db52fbfb5ffef.tar.bz2
samba-875bedddddc51df59f85ae7bbd7db52fbfb5ffef.zip
Fix bug #9130 - Certain xattrs cause Windows error 0x800700FF
Ensure we never return any zero-length EA's. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@suse.de>
Diffstat (limited to 'source3/smbd/trans2.c')
-rw-r--r--source3/smbd/trans2.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 83988583b7..b243af8f27 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -358,6 +358,15 @@ static NTSTATUS get_ea_list_from_file_path(TALLOC_CTX *mem_ctx, connection_struc
return status;
}
+ if (listp->ea.value.length == 0) {
+ /*
+ * We can never return a zero length EA.
+ * Windows reports the EA's as corrupted.
+ */
+ TALLOC_FREE(listp);
+ continue;
+ }
+
push_ascii_fstring(dos_ea_name, listp->ea.name);
*pea_total_len +=