[PATCH] pyrpc: Fix CID 1364169 Explicit null dereferenced
Jeremy Allison
jra at samba.org
Fri Jul 22 00:15:54 UTC 2016
On Wed, Jul 20, 2016 at 10:51:20AM +0200, Volker Lendecke wrote:
> Hi!
>
> Review appreciated!
LGTM. Pushed !
> From 4c279fc8b1da4b20849ffb6edfc4f5e5c7a8cb26 Mon Sep 17 00:00:00 2001
> From: Volker Lendecke <vl at samba.org>
> Date: Wed, 20 Jul 2016 10:50:14 +0200
> Subject: [PATCH] pyrpc: Fix CID 1364169 Explicit null dereferenced
>
> Signed-off-by: Volker Lendecke <vl at samba.org>
> ---
> source4/librpc/rpc/pyrpc_util.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/source4/librpc/rpc/pyrpc_util.c b/source4/librpc/rpc/pyrpc_util.c
> index a9807a8..95443f7 100644
> --- a/source4/librpc/rpc/pyrpc_util.c
> +++ b/source4/librpc/rpc/pyrpc_util.c
> @@ -234,7 +234,7 @@ PyObject *py_dcerpc_interface_init_helper(PyTypeObject *type, PyObject *args, Py
> }
>
> /* reset timeout for the handle */
> - if (timeout != ((unsigned int)-1)) {
> + if ((timeout != ((unsigned int)-1)) && (ret->binding_handle != NULL)) {
> dcerpc_binding_handle_set_timeout(ret->binding_handle, timeout);
> }
>
> --
> 2.1.4
>
More information about the samba-technical
mailing list