git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c593b15
)
Merge of pull_ascii() and pull_ucs2() termination fixes from 3.0
author
Tim Potter
<tpot@samba.org>
Wed, 28 May 2003 00:56:51 +0000
(
00:56
+0000)
committer
Tim Potter
<tpot@samba.org>
Wed, 28 May 2003 00:56:51 +0000
(
00:56
+0000)
(This used to be commit
bd97a76388b3f16d287c25579f02afe072cdec25
)
source3/lib/charcnv.c
patch
|
blob
|
history
diff --git
a/source3/lib/charcnv.c
b/source3/lib/charcnv.c
index c3360bbb65891b60a29cb4e137b0532a8a8eb58e..eb427cc0fce23ac39a3b4dc88ca98a9efeb7b116 100644
(file)
--- a/
source3/lib/charcnv.c
+++ b/
source3/lib/charcnv.c
@@
-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;
}