summaryrefslogtreecommitdiff
path: root/lib/util
diff options
context:
space:
mode:
Diffstat (limited to 'lib/util')
-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;
}