From 0d556eabdecbcee20e947cd81c50fd8bca79af46 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 :) Signed-off-by: Stefan Metzmacher (This used to be commit ac3597ef8b7781499ab55f1039670ec82202e32c) --- source3/web/cgi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/web/cgi.c b/source3/web/cgi.c index 28f64f89ade..070e80cf91d 100644 --- a/source3/web/cgi.c +++ b/source3/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 : ""); -- 2.11.4.GIT