diff options
author | Jeremy Allison <jra@samba.org> | 2003-09-25 21:26:16 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2003-09-25 21:26:16 +0000 |
commit | d3b9384308e4b5130c9455b853edc4702d7af303 (patch) | |
tree | 026331069404a2dfd74d5d1443cf416d9ccaaa09 /source3/python/py_spoolss_forms_conv.c | |
parent | 6c623b55bd023d9b2afa6ac3d69d814475a493e4 (diff) | |
download | samba-d3b9384308e4b5130c9455b853edc4702d7af303.tar.gz samba-d3b9384308e4b5130c9455b853edc4702d7af303.tar.bz2 samba-d3b9384308e4b5130c9455b853edc4702d7af303.zip |
Fix for #480. Change the interface for init_unistr2 to not take a length
but a flags field. We were assuming that 2*strlen(mb_string) == length of ucs2-le string.
This is not the case. Count it after conversion.
Jeremy.
(This used to be commit f82c273a42f930c7152cfab84394781744815e0e)
Diffstat (limited to 'source3/python/py_spoolss_forms_conv.c')
-rw-r--r-- | source3/python/py_spoolss_forms_conv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/python/py_spoolss_forms_conv.c b/source3/python/py_spoolss_forms_conv.c index 095a318fd2..ede729cad3 100644 --- a/source3/python/py_spoolss_forms_conv.c +++ b/source3/python/py_spoolss_forms_conv.c @@ -81,7 +81,7 @@ BOOL py_to_FORM(FORM *form, PyObject *dict) obj = PyDict_GetItemString(dict, "name"); name = PyString_AsString(obj); - init_unistr2(&form->name, name, strlen(name) + 1); + init_unistr2(&form->name, name, UNI_STR_TERMINATE); result = True; |