From a52f17995177ca8751400570cc8aabc7e06ade72 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 23 Jun 2011 14:44:25 +0200 Subject: lib: Allow NULL converted_size in convert_string_talloc --- lib/util/charset/convert_string.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/util/charset') diff --git a/lib/util/charset/convert_string.c b/lib/util/charset/convert_string.c index 51f9fec137..8f46c88039 100644 --- a/lib/util/charset/convert_string.c +++ b/lib/util/charset/convert_string.c @@ -376,7 +376,9 @@ bool convert_string_talloc_handle(TALLOC_CTX *ctx, struct smb_iconv_handle *ic, errno = ENOMEM; return false; } - *converted_size = destlen; + if (converted_size != NULL) { + *converted_size = destlen; + } *dest = ob; return true; } @@ -470,7 +472,9 @@ bool convert_string_talloc_handle(TALLOC_CTX *ctx, struct smb_iconv_handle *ic, } } - *converted_size = destlen; + if (converted_size != NULL) { + *converted_size = destlen; + } return true; } -- cgit