From 0c5214e2eb6249914230f092fe35dfa49da24c34 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 29 Mar 2011 11:16:26 -0700 Subject: Ensure convert_string_XXX is always called with a valid converted_size pointer. Preparation for cleaning up this API. Autobuild-User: Jeremy Allison Autobuild-Date: Tue Mar 29 21:01:49 CEST 2011 on sn-devel-104 --- source4/dsdb/schema/schema_syntax.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source4/dsdb/schema') diff --git a/source4/dsdb/schema/schema_syntax.c b/source4/dsdb/schema/schema_syntax.c index 88badc7136..8be87df827 100644 --- a/source4/dsdb/schema/schema_syntax.c +++ b/source4/dsdb/schema/schema_syntax.c @@ -1470,6 +1470,7 @@ static WERROR dsdb_syntax_UNICODE_drsuapi_to_ldb(const struct dsdb_syntax_ctx *c W_ERROR_HAVE_NO_MEMORY(out->values); for (i=0; i < out->num_values; i++) { + size_t converted_size = 0; char *str; if (in->value_ctr.values[i].blob == NULL) { @@ -1484,7 +1485,7 @@ static WERROR dsdb_syntax_UNICODE_drsuapi_to_ldb(const struct dsdb_syntax_ctx *c CH_UTF16, CH_UNIX, in->value_ctr.values[i].blob->data, in->value_ctr.values[i].blob->length, - (void **)&str, NULL)) { + (void **)&str, &converted_size)) { return WERR_FOOBAR; } @@ -2227,6 +2228,7 @@ static WERROR dsdb_syntax_PRESENTATION_ADDRESS_drsuapi_to_ldb(const struct dsdb_ for (i=0; i < out->num_values; i++) { size_t len; + size_t converted_size = 0; char *str; if (in->value_ctr.values[i].blob == NULL) { @@ -2246,7 +2248,7 @@ static WERROR dsdb_syntax_PRESENTATION_ADDRESS_drsuapi_to_ldb(const struct dsdb_ if (!convert_string_talloc(out->values, CH_UTF16, CH_UNIX, in->value_ctr.values[i].blob->data+4, in->value_ctr.values[i].blob->length-4, - (void **)&str, NULL)) { + (void **)&str, &converted_size)) { return WERR_FOOBAR; } -- cgit