]> granicus.if.org Git - curl/commitdiff
curl: whitelist use of strtok() in non-threaded context
authorDaniel Stenberg <daniel@haxx.se>
Wed, 7 Sep 2016 08:43:40 +0000 (10:43 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 7 Sep 2016 08:43:40 +0000 (10:43 +0200)
src/tool_dirhie.c
src/tool_paramhlp.c

index b65db4110449d2d14ef699d1e334eddd03874c53..db810d647ecb76d09984b0b0a7c87a8d61381091 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, 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) {
index f2e68da5d34349b47b18066ba36893631db9ec77..820d872bcec6c4efdf9440ec330e44391801a729 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, 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)) {