diff options
author | Jeremy Allison <jra@samba.org> | 2011-03-29 11:16:26 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2011-03-29 21:01:49 +0200 |
commit | 0c5214e2eb6249914230f092fe35dfa49da24c34 (patch) | |
tree | a7e0b1952b1993e1859a6653fc38caf2501e6858 /source4/dsdb | |
parent | 1e50f9a5c263ed19ef8e9c689c96f1e51194f405 (diff) | |
download | samba-0c5214e2eb6249914230f092fe35dfa49da24c34.tar.gz samba-0c5214e2eb6249914230f092fe35dfa49da24c34.tar.bz2 samba-0c5214e2eb6249914230f092fe35dfa49da24c34.zip |
Ensure convert_string_XXX is always called with a valid converted_size pointer.
Preparation for cleaning up this API.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Mar 29 21:01:49 CEST 2011 on sn-devel-104
Diffstat (limited to 'source4/dsdb')
-rw-r--r-- | source4/dsdb/schema/schema_syntax.c | 6 |
1 files changed, 4 insertions, 2 deletions
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; } |