From 1f105008535c7d8604a396469df7eb73b5fd50c9 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 3 Jun 2008 15:05:50 +0200 Subject: [PATCH] Fix saving of the config file in SWAT; [#5516]. The strlen of the source string passed to convert_string_allocate was too short :) --- source/web/cgi.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/web/cgi.c b/source/web/cgi.c index 28f64f8..070e80c 100644 --- a/source/web/cgi.c +++ b/source/web/cgi.c @@ -206,14 +206,14 @@ void cgi_load_variables(void) size_t dest_len; convert_string_allocate(frame, CH_UTF8, CH_UNIX, - variables[i].name, -1, + variables[i].name, strlen(variables[i].name), &dest, &dest_len, True); SAFE_FREE(variables[i].name); variables[i].name = SMB_STRDUP(dest ? dest : ""); dest = NULL; convert_string_allocate(frame, CH_UTF8, CH_UNIX, - variables[i].value, -1, + variables[i].value, strlen(variables[i].value), &dest, &dest_len, True); SAFE_FREE(variables[i].value); variables[i].value = SMB_STRDUP(dest ? dest : ""); -- 1.5.4.5