summaryrefslogtreecommitdiff
path: root/source3/lib/charcnv.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/charcnv.c')
-rw-r--r--source3/lib/charcnv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c
index 1fa2c5c8cf..407a2091f9 100644
--- a/source3/lib/charcnv.c
+++ b/source3/lib/charcnv.c
@@ -286,10 +286,10 @@ static size_t push_ucs2(const void *base_ptr, void *dest, const char *src, size_
smb_ucs2_t *dest_ucs2 = (smb_ucs2_t *)dest;
size_t i;
- /* We check for i < (ret / 2) below as the dest string isn't null
+ /* We check for i < (size / 2) below as the dest string isn't null
terminated if STR_TERMINATE isn't set. */
- for (i = 0; i < (ret / 2) && i < (dest_len / 2) && dest_ucs2[i]; i++) {
+ for (i = 0; i < (size / 2) && i < (dest_len / 2) && dest_ucs2[i]; i++) {
smb_ucs2_t v = toupper_w(dest_ucs2[i]);
if (v != dest_ucs2[i]) {
dest_ucs2[i] = v;