diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-10-09 21:30:41 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:39:36 -0500 |
commit | d611dd941f5b1b113697cf91193f0a8418f21b36 (patch) | |
tree | ca83fff20930292465d64c49216183f5ecc59e43 /source4 | |
parent | 12fb2fc09e494721ce5fc92545bddca02346443f (diff) | |
download | samba-d611dd941f5b1b113697cf91193f0a8418f21b36.tar.gz samba-d611dd941f5b1b113697cf91193f0a8418f21b36.tar.bz2 samba-d611dd941f5b1b113697cf91193f0a8418f21b36.zip |
r10854: talloc_get_type() can return NULL..
(This used to be commit 8f7070055fc577cb4234654420539c68992d9671)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/rpc_server/spoolss/dcesrv_spoolss.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source4/rpc_server/spoolss/dcesrv_spoolss.c b/source4/rpc_server/spoolss/dcesrv_spoolss.c index c15a7f1d8a..6936866fcc 100644 --- a/source4/rpc_server/spoolss/dcesrv_spoolss.c +++ b/source4/rpc_server/spoolss/dcesrv_spoolss.c @@ -538,6 +538,8 @@ static WERROR spoolss_GetPrinterData(struct dcesrv_call_state *dce_call, TALLOC_ DCESRV_PULL_HANDLE_WERR(h, r->in.handle, DCESRV_HANDLE_ANY); handle = talloc_get_type(h->data, struct ntptr_GenericHandle); + if (!handle) + return WERR_BADFID; switch (handle->type) { case NTPTR_HANDLE_SERVER: @@ -609,6 +611,8 @@ static WERROR spoolss_AddForm(struct dcesrv_call_state *dce_call, TALLOC_CTX *me DCESRV_PULL_HANDLE_WERR(h, r->in.handle, DCESRV_HANDLE_ANY); handle = talloc_get_type(h->data, struct ntptr_GenericHandle); + if (!handle) + return WERR_BADFID; switch (handle->type) { case NTPTR_HANDLE_SERVER: @@ -639,6 +643,8 @@ static WERROR spoolss_DeleteForm(struct dcesrv_call_state *dce_call, TALLOC_CTX DCESRV_PULL_HANDLE_WERR(h, r->in.handle, DCESRV_HANDLE_ANY); handle = talloc_get_type(h->data, struct ntptr_GenericHandle); + if (!handle) + return WERR_BADFID; switch (handle->type) { case NTPTR_HANDLE_SERVER: @@ -669,6 +675,8 @@ static WERROR spoolss_GetForm(struct dcesrv_call_state *dce_call, TALLOC_CTX *me DCESRV_PULL_HANDLE_WERR(h, r->in.handle, DCESRV_HANDLE_ANY); handle = talloc_get_type(h->data, struct ntptr_GenericHandle); + if (!handle) + return WERR_BADFID; switch (handle->type) { case NTPTR_HANDLE_SERVER: @@ -702,6 +710,8 @@ static WERROR spoolss_SetForm(struct dcesrv_call_state *dce_call, TALLOC_CTX *me DCESRV_PULL_HANDLE_WERR(h, r->in.handle, DCESRV_HANDLE_ANY); handle = talloc_get_type(h->data, struct ntptr_GenericHandle); + if (!handle) + return WERR_BADFID; switch (handle->type) { case NTPTR_HANDLE_SERVER: @@ -732,6 +742,8 @@ static WERROR spoolss_EnumForms(struct dcesrv_call_state *dce_call, TALLOC_CTX * DCESRV_PULL_HANDLE_WERR(h, r->in.handle, DCESRV_HANDLE_ANY); handle = talloc_get_type(h->data, struct ntptr_GenericHandle); + if (!handle) + return WERR_BADFID; switch (handle->type) { case NTPTR_HANDLE_SERVER: |