git.samba.org
/
jra
/
samba
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ad97bcf
)
r25195: Fix issue with calling pull_uc2_*alloc with
author
Jeremy Allison
<jra@samba.org>
Mon, 17 Sep 2007 10:50:59 +0000
(10:50 +0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 17:30:50 +0000
(12:30 -0500)
str_len == 0. We should just return 0 in this
case.
Jeremy.
(This used to be commit
8bb85f3f141f0f45b06d28f004cb2cf18252d4e1
)
source3/lib/charcnv.c
patch
|
blob
|
history
diff --git
a/source3/lib/charcnv.c
b/source3/lib/charcnv.c
index a8fb95df06300539a24334cebbfa58d488d9c067..9e669a1c9c56c957771339ed0608bbd4b98692d4 100644
(file)
--- a/
source3/lib/charcnv.c
+++ b/
source3/lib/charcnv.c
@@
-1369,6
+1369,10
@@
size_t pull_ucs2(const void *base_ptr, char *dest, const void *src, size_t dest_
{
size_t ret;
+ if (!src_len) {
+ return 0;
+ }
+
if (dest_len == (size_t)-1)
dest_len = sizeof(pstring);
@@
-1446,6
+1450,10
@@
static size_t pull_ucs2_base_talloc(TALLOC_CTX *ctx,
}
#endif
+ if (!src_len) {
+ return 0;
+ }
+
if (ucs2_align(base_ptr, src, flags)) {
src = (const void *)((const char *)src + 1);
if (src_len != (size_t)-1)