($bs = 1) if (property_matches($e, "flag", ".*LIBNDR_FLAG_STR_ASCII.*"));
if (property_matches($e, "flag", ".*LIBNDR_FLAG_STR_SIZE4.*") and property_matches($e, "flag", ".*LIBNDR_FLAG_STR_LEN4.*")) {
- $self->pidl_code("char *data;\n");
- $self->pidl_code("offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, di, drep, $bs, $hf, FALSE, &data);");
+ $self->pidl_code("char *data = NULL;");
+ $self->pidl_code("struct ndr_generic_array nga = { .is_conformant = FALSE, };");
+ $self->pidl_code("offset = dissect_ndr_conformant_array_hdr(tvb, offset, pinfo, tree, di, drep, &nga);");
+ $self->pidl_code("offset = dissect_ndr_varying_array_hdr(tvb, offset, pinfo, tree, di, drep, &nga);");
+ $self->pidl_code("offset = dissect_ndr_generic_array_string(tvb, offset, pinfo, tree, di, drep, $bs, $hf, FALSE, &nga, &data);");
$self->pidl_code("proto_item_append_text(tree, \": %s\", data);");
} elsif (property_matches($e, "flag", ".*LIBNDR_FLAG_STR_SIZE4.*")) {
- $self->pidl_code("offset = dissect_ndr_vstring(tvb, offset, pinfo, tree, di, drep, $bs, $hf, FALSE, NULL);");
+ $self->pidl_code("char *data = NULL;");
+ $self->pidl_code("struct ndr_generic_array nga = { .is_conformant = FALSE, };");
+ $self->pidl_code("offset = dissect_ndr_conformant_array_hdr(tvb, offset, pinfo, tree, di, drep, &nga);");
+ $self->pidl_code("offset = dissect_ndr_generic_array_string(tvb, offset, pinfo, tree, di, drep, $bs, $hf, FALSE, &nga, &data);");
+ $self->pidl_code("proto_item_append_text(tree, \": %s\", data);");
+ } elsif (property_matches($e, "flag", ".*LIBNDR_FLAG_STR_LEN4.*")) {
+ $self->pidl_code("char *data = NULL;");
+ $self->pidl_code("struct ndr_generic_array nga = { .is_conformant = FALSE, };");
+ $self->pidl_code("offset = dissect_ndr_varying_array_hdr(tvb, offset, pinfo, tree, di, drep, &nga);");
+ $self->pidl_code("offset = dissect_ndr_generic_array_string(tvb, offset, pinfo, tree, di, drep, $bs, $hf, FALSE, &nga, &data);");
+ $self->pidl_code("proto_item_append_text(tree, \": %s\", data);");
} elsif (property_matches($e, "flag", ".*STR_NULLTERM.*")) {
if ($bs == 2) {
$self->pidl_code("offset = dissect_null_term_wstring(tvb, offset, pinfo, tree, drep, $hf , 0);")