From 177bf9a877b8ed20d9abe8ada32b8d82ff9a6149 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 1 Dec 2007 15:05:18 +0100 Subject: Move pulling the ea list out of the way (This used to be commit 753e640f49125c319d7b8f2db262e273a1727691) --- source3/smbd/nttrans.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index aed237fc65..c19ba6519f 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -1269,7 +1269,6 @@ static void call_nt_transact_create(connection_struct *conn, struct timespec a_timespec; struct timespec m_timespec; struct ea_list *ea_list = NULL; - char *pdata = NULL; NTSTATUS status; size_t param_len; struct case_semantics_state *case_state = NULL; @@ -1344,6 +1343,14 @@ static void call_nt_transact_create(connection_struct *conn, reply_nterror(req, NT_STATUS_INVALID_PARAMETER); return; } + + /* We have already checked that ea_len <= data_count here. */ + ea_list = read_nttrans_ea_list(talloc_tos(), data + sd_len, + ea_len); + if (ea_list == NULL) { + reply_nterror(req, NT_STATUS_INVALID_PARAMETER); + return; + } } srvstr_get_path(ctx, params, req->flags2, &fname, @@ -1539,19 +1546,6 @@ static void call_nt_transact_create(connection_struct *conn, } #endif - if (ea_len) { - pdata = data + sd_len; - - /* We have already checked that ea_len <= data_count here. */ - ea_list = read_nttrans_ea_list(talloc_tos(), pdata, - ea_len); - if (!ea_list ) { - TALLOC_FREE(case_state); - reply_nterror(req, NT_STATUS_INVALID_PARAMETER); - return; - } - } - /* * If it's a request for a directory open, deal with it separately. */ -- cgit