summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-06-23 14:44:25 +0200
committerVolker Lendecke <vl@samba.org>2011-06-24 21:24:17 +0200
commita52f17995177ca8751400570cc8aabc7e06ade72 (patch)
treeca5d4a7e2b5e250e2d1d1584670e0f65c4118b00 /lib
parentd7cc8571f756659661285f38ba61ff92683194f7 (diff)
downloadsamba-a52f17995177ca8751400570cc8aabc7e06ade72.tar.gz
samba-a52f17995177ca8751400570cc8aabc7e06ade72.tar.bz2
samba-a52f17995177ca8751400570cc8aabc7e06ade72.zip
lib: Allow NULL converted_size in convert_string_talloc
Diffstat (limited to 'lib')
-rw-r--r--lib/util/charset/convert_string.c8
1 files changed, 6 insertions, 2 deletions
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;
}