diff options
author | Andreas Schneider <anschneider@suse.de> | 2008-06-03 15:26:42 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2008-06-03 15:35:41 +0200 |
commit | 8c7e21679b69eab4319efb484630cddfaf973e36 (patch) | |
tree | 5a4561213053c0d890f44300f0bef2a6ef6745d1 /source3/web | |
parent | 0d556eabdecbcee20e947cd81c50fd8bca79af46 (diff) | |
download | samba-8c7e21679b69eab4319efb484630cddfaf973e36.tar.gz samba-8c7e21679b69eab4319efb484630cddfaf973e36.tar.bz2 samba-8c7e21679b69eab4319efb484630cddfaf973e36.zip |
Fix empty input fields in SWAT; [#5515].
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(This used to be commit e1579c90fb27c07f95889dd8778daeef53e2ac16)
Diffstat (limited to 'source3/web')
-rw-r--r-- | source3/web/swat.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/web/swat.c b/source3/web/swat.c index 3e14d2d098..373ab73127 100644 --- a/source3/web/swat.c +++ b/source3/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; |