From 5dd2bd50768ef57072e27b42faf7790875c7bae8 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 23 Jun 2000 17:31:38 +0000 Subject: lib/util_unistr.c: Off-by-one fix for dos_PutUniStr from John Reilly jreilly@hp.com. Memory leak fix for new sec_ctx code (sorry Tim :-). Jeremy. (This used to be commit edaf49c66d5a5ccf6689b358c301e208599a468f) --- source3/lib/util_unistr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/lib') 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); -- cgit