mirror of
https://github.com/samba-team/samba.git
synced 2025-02-04 17:47:26 +03:00
fixed a silly off by 1 bug
(This used to be commit e558ab6ac8930e3393291fe12289ad43175b8a1d)
This commit is contained in:
parent
1c29d9d8f0
commit
79b5b1aebf
@ -99,6 +99,9 @@ size_t convert_string(charset_t from, charset_t to,
|
|||||||
static int initialised;
|
static int initialised;
|
||||||
smb_iconv_t descriptor;
|
smb_iconv_t descriptor;
|
||||||
|
|
||||||
|
if (srclen == -1) srclen = strlen(src)+1;
|
||||||
|
if (destlen == -1) destlen = strlen(dest)+1;
|
||||||
|
|
||||||
if (!initialised) {
|
if (!initialised) {
|
||||||
initialised = 1;
|
initialised = 1;
|
||||||
init_iconv();
|
init_iconv();
|
||||||
|
@ -221,13 +221,13 @@ void cgi_load_variables(void)
|
|||||||
pstring dest;
|
pstring dest;
|
||||||
|
|
||||||
convert_string(CH_DISPLAY, CH_UNIX,
|
convert_string(CH_DISPLAY, CH_UNIX,
|
||||||
variables[i].name, strlen(variables[i].name),
|
variables[i].name, -1,
|
||||||
dest, sizeof(dest));
|
dest, sizeof(dest));
|
||||||
free(variables[i].name);
|
free(variables[i].name);
|
||||||
variables[i].name = strdup(dest);
|
variables[i].name = strdup(dest);
|
||||||
|
|
||||||
convert_string(CH_DISPLAY, CH_UNIX,
|
convert_string(CH_DISPLAY, CH_UNIX,
|
||||||
variables[i].value, strlen(variables[i].name),
|
variables[i].value, -1,
|
||||||
dest, sizeof(dest));
|
dest, sizeof(dest));
|
||||||
free(variables[i].value);
|
free(variables[i].value);
|
||||||
variables[i].value = strdup(dest);
|
variables[i].value = strdup(dest);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user