mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
curl: whitelist use of strtok() in non-threaded context
This commit is contained in:
parent
5871dfcc16
commit
b965090963
@ -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
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* 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';
|
dirbuildup[0] = '\0';
|
||||||
|
|
||||||
|
/* Allow strtok() here since this isn't used threaded */
|
||||||
|
/* !checksrc! disable BANNEDFUNC 2 */
|
||||||
tempdir = strtok(outdup, DIR_CHAR);
|
tempdir = strtok(outdup, DIR_CHAR);
|
||||||
|
|
||||||
while(tempdir != NULL) {
|
while(tempdir != NULL) {
|
||||||
|
@ -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
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* 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)
|
if(!buffer)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
/* Allow strtok() here since this isn't used threaded */
|
||||||
|
/* !checksrc! disable BANNEDFUNC 2 */
|
||||||
for(token = strtok(buffer, sep);
|
for(token = strtok(buffer, sep);
|
||||||
token;
|
token;
|
||||||
token = strtok(NULL, sep)) {
|
token = strtok(NULL, sep)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user