From b96509096336474f0e26b80792b021472ae33fcd Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 7 Sep 2016 10:43:40 +0200 Subject: curl: whitelist use of strtok() in non-threaded context --- src/tool_dirhie.c | 4 +++- src/tool_paramhlp.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/tool_dirhie.c b/src/tool_dirhie.c index b65db4110..db810d647 100644 --- a/src/tool_dirhie.c +++ b/src/tool_dirhie.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -112,6 +112,8 @@ CURLcode create_dir_hierarchy(const char *outfile, FILE *errors) } dirbuildup[0] = '\0'; + /* Allow strtok() here since this isn't used threaded */ + /* !checksrc! disable BANNEDFUNC 2 */ tempdir = strtok(outdup, DIR_CHAR); while(tempdir != NULL) { diff --git a/src/tool_paramhlp.c b/src/tool_paramhlp.c index f2e68da5d..820d872bc 100644 --- a/src/tool_paramhlp.c +++ b/src/tool_paramhlp.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -284,6 +284,8 @@ long proto2num(struct OperationConfig *config, long *val, const char *str) if(!buffer) return 1; + /* Allow strtok() here since this isn't used threaded */ + /* !checksrc! disable BANNEDFUNC 2 */ for(token = strtok(buffer, sep); token; token = strtok(NULL, sep)) { -- cgit v1.2.3