1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-22 22:04:08 +03:00

Merge of pull_ascii() and pull_ucs2() termination fixes from 3.0

(This used to be commit bd97a76388b3f16d287c25579f02afe072cdec25)
This commit is contained in:
Tim Potter 2003-05-28 00:56:51 +00:00
parent c593b15e76
commit 5c385ce833

View File

@ -420,6 +420,8 @@ size_t pull_ascii(char *dest, const void *src, size_t dest_len, size_t src_len,
if (dest_len)
dest[MIN(ret, dest_len-1)] = 0;
else
dest[0] = 0;
return src_len;
}
@ -629,6 +631,8 @@ size_t pull_ucs2(const void *base_ptr, char *dest, const void *src, size_t dest_
ret = convert_string(CH_UCS2, CH_UNIX, src, src_len, dest, dest_len);
if (dest_len)
dest[MIN(ret, dest_len-1)] = 0;
else
dest[0] = 0;
return src_len;
}