pidl/Python: initialise a datablob
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Sun, 24 Feb 2019 06:31:07 +0000 (19:31 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 4 Mar 2019 22:41:01 +0000 (22:41 +0000)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Mar  4 22:41:01 UTC 2019 on sn-devel-144

pidl/lib/Parse/Pidl/Samba4/Python.pm

index efa80d7cdd1457a2e98b81907cec5a70a335347b..26a1d9b4fc61507b6cccd1c77e62939a8b20e561 100644 (file)
@@ -313,7 +313,7 @@ sub PythonStruct($$$$$$)
                $self->pidl("{");
                $self->indent;
                $self->pidl("$cname *object = ($cname *)pytalloc_get_ptr(py_obj);");
-               $self->pidl("DATA_BLOB blob;");
+               $self->pidl("DATA_BLOB blob = {.data = NULL, .length = 0};");
                $self->pidl("Py_ssize_t blob_length = 0;");
                $self->pidl("enum ndr_err_code err;");
                $self->pidl("const char * const kwnames[] = { \"data_blob\", \"allow_remaining\", NULL };");