From 587cf54c61c9f1f7bcae431a82035fd942716c32 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 23 Jan 2008 11:04:10 +0100 Subject: strtok -> strtok_r (This used to be commit fd34ce437057bb34cdc37f4b066e424000d36789) --- source3/web/cgi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source3/web') 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; -- cgit From 2762b9a97582b9b28fd5985ba8e3d0299126820e Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 4 Feb 2008 20:57:35 +0100 Subject: Always pass a TALLOC_CTX to str_list_make and str_list_copy (This used to be commit e2c9fc4cf5f0ff725330fa44f53782db65fca37e) --- source3/web/neg_lang.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/web') 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); -- cgit