summaryrefslogtreecommitdiff
path: root/source3/lib/util_unistr.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/util_unistr.c')
-rw-r--r--source3/lib/util_unistr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/lib/util_unistr.c b/source3/lib/util_unistr.c
index d4a159a28e..1c13ff2758 100644
--- a/source3/lib/util_unistr.c
+++ b/source3/lib/util_unistr.c
@@ -55,7 +55,7 @@ static uint16 *ucs2_to_unixcp;
size_t dos_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate)
{
size_t ret = 0;
- while (*src && (len > 2)) {
+ while (*src && (len >= 2)) {
size_t skip = get_character_len(*src);
smb_ucs2_t val = (*src & 0xff);