summaryrefslogtreecommitdiff
path: root/librpc
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2010-10-31 02:04:25 +0200
committerMichael Adam <obnox@samba.org>2010-11-03 23:28:07 +0000
commit7e382a0496efdcbcd1189ab40a15702c54622200 (patch)
treedcb39e9247e638a29c03dbb37d1da92e007e67cd /librpc
parent50bdd93136d0c6e971705594a181a3a5175e2bae (diff)
downloadsamba-7e382a0496efdcbcd1189ab40a15702c54622200.tar.gz
samba-7e382a0496efdcbcd1189ab40a15702c54622200.tar.bz2
samba-7e382a0496efdcbcd1189ab40a15702c54622200.zip
librpc/ndr: use new strlen_m_ext_term() in ndr_charset_length(): fix bug #7594
This fixes the calculation of needed space for destination unicode charset. Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Wed Nov 3 23:28:07 UTC 2010 on sn-devel-104
Diffstat (limited to 'librpc')
-rw-r--r--librpc/ndr/ndr_string.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/librpc/ndr/ndr_string.c b/librpc/ndr/ndr_string.c
index e1f3a5245a..610676cf78 100644
--- a/librpc/ndr/ndr_string.c
+++ b/librpc/ndr/ndr_string.c
@@ -731,11 +731,11 @@ _PUBLIC_ uint32_t ndr_charset_length(const void *var, charset_t chset)
case CH_UTF16LE:
case CH_UTF16BE:
case CH_UTF16MUNGED:
- return strlen_m_term((const char *)var);
+ case CH_UTF8:
+ return strlen_m_ext_term((const char *)var, CH_UNIX, chset);
case CH_DISPLAY:
case CH_DOS:
case CH_UNIX:
- case CH_UTF8:
return strlen((const char *)var)+1;
}