mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
CVE-2023-34968: mdssvc: switch to doing an early return
Just reduce indentation of the code handling the success case. No change in behaviour. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15388 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
parent
34f9f1b37e
commit
0fdfc85f28
@ -1817,20 +1817,22 @@ bool mds_dispatch(struct mds_ctx *mds_ctx,
|
||||
}
|
||||
|
||||
ok = slcmd->function(mds_ctx, query, reply);
|
||||
if (ok) {
|
||||
DBG_DEBUG("%s", dalloc_dump(reply, 0));
|
||||
|
||||
len = sl_pack(reply,
|
||||
(char *)response_blob->spotlight_blob,
|
||||
response_blob->size);
|
||||
if (len == -1) {
|
||||
DBG_ERR("error packing Spotlight RPC reply\n");
|
||||
ok = false;
|
||||
goto cleanup;
|
||||
}
|
||||
response_blob->length = len;
|
||||
if (!ok) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
DBG_DEBUG("%s", dalloc_dump(reply, 0));
|
||||
|
||||
len = sl_pack(reply,
|
||||
(char *)response_blob->spotlight_blob,
|
||||
response_blob->size);
|
||||
if (len == -1) {
|
||||
DBG_ERR("error packing Spotlight RPC reply\n");
|
||||
ok = false;
|
||||
goto cleanup;
|
||||
}
|
||||
response_blob->length = len;
|
||||
|
||||
cleanup:
|
||||
talloc_free(query);
|
||||
talloc_free(reply);
|
||||
|
Loading…
Reference in New Issue
Block a user