diff options
Diffstat (limited to 'source3/web')
-rw-r--r-- | source3/web/cgi.c | 4 | ||||
-rw-r--r-- | source3/web/neg_lang.c | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/source3/web/cgi.c b/source3/web/cgi.c index 07a6fbcf54..c6233b0869 100644 --- a/source3/web/cgi.c +++ b/source3/web/cgi.c @@ -164,7 +164,9 @@ void cgi_load_variables(void) open("/dev/null", O_RDWR); if ((s=query_string) || (s=getenv("QUERY_STRING"))) { - for (tok=strtok(s,"&;");tok;tok=strtok(NULL,"&;")) { + char *saveptr; + for (tok=strtok_r(s, "&;", &saveptr); tok; + tok=strtok_r(NULL, "&;", &saveptr)) { p = strchr_m(tok,'='); if (!p) continue; diff --git a/source3/web/neg_lang.c b/source3/web/neg_lang.c index bb481306e7..82411000cd 100644 --- a/source3/web/neg_lang.c +++ b/source3/web/neg_lang.c @@ -74,7 +74,7 @@ void web_set_lang(const char *lang_string) int lang_num, i; /* build the lang list */ - lang_list = str_list_make(lang_string, ", \t\r\n"); + lang_list = str_list_make(talloc_tos(), lang_string, ", \t\r\n"); if (!lang_list) return; /* sort the list by priority */ @@ -100,7 +100,7 @@ void web_set_lang(const char *lang_string) } pl[i].string = SMB_STRDUP(lang_list[i]); } - str_list_free(&lang_list); + TALLOC_FREE(lang_list); qsort(pl, lang_num, sizeof(struct pri_list), &qsort_cmp_list); |