[SCM] Samba Shared Repository - branch v3-2-test updated -
release-3-2-0pre2-2504-gf29f96f
Stefan Metzmacher
metze at samba.org
Tue Jun 3 14:00:34 GMT 2008
The branch, v3-2-test has been updated
via f29f96fe76a139291cbc6e2dee1bca160ea3460a (commit)
via cd7e6b0a0de376c94f9c97247db65a959031a21a (commit)
from e7b0d54fa0c26117047c23b2a295edfbad3c19d9 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit f29f96fe76a139291cbc6e2dee1bca160ea3460a
Author: Andreas Schneider <anschneider at suse.de>
Date: Tue Jun 3 15:26:42 2008 +0200
Fix empty input fields in SWAT; [#5515].
Signed-off-by: Stefan Metzmacher <metze at samba.org>
(cherry picked from commit e1579c90fb27c07f95889dd8778daeef53e2ac16)
commit cd7e6b0a0de376c94f9c97247db65a959031a21a
Author: Andreas Schneider <anschneider at suse.de>
Date: Tue Jun 3 15:05:50 2008 +0200
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 <metze at samba.org>
(cherry picked from commit ac3597ef8b7781499ab55f1039670ec82202e32c)
-----------------------------------------------------------------------
Summary of changes:
source/web/cgi.c | 4 ++--
source/web/swat.c | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
Changeset truncated at 500 lines:
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 : "");
diff --git a/source/web/swat.c b/source/web/swat.c
index 6d8f4ca..6c6d78e 100644
--- a/source/web/swat.c
+++ b/source/web/swat.c
@@ -86,13 +86,14 @@ static const char *fix_quotes(TALLOC_CTX *ctx, const char *str)
/* Count the number of quotes. */
newstring_len = 1;
- while (*str) {
- if ( *str == '\"') {
+ p = (char *) str;
+ while (*p) {
+ if ( *p == '\"') {
newstring_len += quote_len;
} else {
newstring_len++;
}
- ++str;
+ ++p;
}
newstring = TALLOC_ARRAY(ctx, char, newstring_len);
if (!newstring) {
@@ -105,7 +106,6 @@ static const char *fix_quotes(TALLOC_CTX *ctx, const char *str)
} else {
*p++ = *str;
}
- ++str;
}
*p = '\0';
return newstring;
--
Samba Shared Repository
More information about the samba-cvs
mailing list