i = 0;
if ( ! tree->u.substring.start_with_wildcard) {
asn1_push_tag(data, ASN1_CONTEXT_SIMPLE(0));
- asn1_write_LDAPString(data, tree->u.substring.chunks[i]->data);
+ asn1_write_LDAPString(data, (char *)tree->u.substring.chunks[i]->data);
asn1_pop_tag(data);
i++;
}
ctx = 1;
}
asn1_push_tag(data, ASN1_CONTEXT_SIMPLE(ctx));
- asn1_write_LDAPString(data, tree->u.substring.chunks[i]->data);
+ asn1_write_LDAPString(data, (char *)tree->u.substring.chunks[i]->data);
asn1_pop_tag(data);
i++;
}
asn1_pop_tag(data);
}
asn1_push_tag(data, ASN1_CONTEXT_SIMPLE(3));
- asn1_write_LDAPString(data, tree->u.extended.value.data);
+ asn1_write_LDAPString(data, (char *)tree->u.extended.value.data);
asn1_pop_tag(data);
asn1_push_tag(data, ASN1_CONTEXT_SIMPLE(4));
asn1_write_uint8(data, tree->u.extended.dnAttributes);
return NULL;
}
- chunks[chunk_num]->data = talloc_strdup(mem_ctx, value);
+ chunks[chunk_num]->data = (uint8_t *)talloc_strdup(mem_ctx, value);
if (chunks[chunk_num]->data == NULL) {
return NULL;
}
}
ret->operation = LDB_OP_SUBSTRING;
- ret->u.substring.attr = talloc_memdup(ret, attr.data, attr.length + 1);
- ret->u.substring.attr[attr.length] = '\0';
+ ret->u.substring.attr = talloc_strndup(ret, (char *)attr.data, attr.length);
ret->u.substring.chunks = NULL;
ret->u.substring.start_with_wildcard = 1;
ret->u.substring.end_with_wildcard = 1;