[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 130/153: curl: fix time-of-check, time-of-use race
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 130/153: curl: fix time-of-check, time-of-use race in dir creation |
Date: |
Tue, 11 Sep 2018 12:53:21 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit f16bed0c45dc63864fe2097b7df939276d96d62b
Author: Daniel Stenberg <address@hidden>
AuthorDate: Fri Aug 24 10:01:42 2018 +0200
curl: fix time-of-check, time-of-use race in dir creation
Patch-by: Jay Satiro
Detected by Coverity
Fixes #2739
Closes #2912
---
src/tool_dirhie.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/tool_dirhie.c b/src/tool_dirhie.c
index a01f9dc5f..36c06941c 100644
--- a/src/tool_dirhie.c
+++ b/src/tool_dirhie.c
@@ -139,12 +139,10 @@ CURLcode create_dir_hierarchy(const char *outfile, FILE
*errors)
else
snprintf(dirbuildup, outlen, "%s%s", DIR_CHAR, tempdir);
}
- if(access(dirbuildup, F_OK) == -1) {
- if(-1 == mkdir(dirbuildup, (mode_t)0000750)) {
- show_dir_errno(errors, dirbuildup);
- result = CURLE_WRITE_ERROR;
- break; /* get out of loop */
- }
+ if((-1 == mkdir(dirbuildup, (mode_t)0000750)) && (errno != EEXIST)) {
+ show_dir_errno(errors, dirbuildup);
+ result = CURLE_WRITE_ERROR;
+ break; /* get out of loop */
}
}
tempdir = tempdir2;
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 134/153: THANKS-filter: dedup Daniel Jeliński, (continued)
- [GNUnet-SVN] [gnurl] 134/153: THANKS-filter: dedup Daniel Jeliński, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 152/153: Merge tag 'curl-7_61_1', gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 141/153: test1148: fix precheck output, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 127/153: lib1522: fix curl_easy_setopt argument type, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 135/153: CURLOPT_SSL_CTX_FUNCTION.3: clarify connection reuse warning, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 129/153: cmdline-opts/page-footer: fix edit mistake, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 140/153: all: s/int/size_t cleanup, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 139/153: ssh-libssh: use FALLTHROUGH to silence gcc8, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 131/153: CURLOPT_SSL_CTX_FUNCTION.3: might cause unintended connection reuse [ci skip], gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 126/153: curl_threads: silence bad-function-cast warning, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 130/153: curl: fix time-of-check, time-of-use race in dir creation,
gnunet <=
- [GNUnet-SVN] [gnurl] 142/153: http2: Use correct format identifier for stream_id, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 113/153: curl-compilers: enable -Wimplicit-fallthrough=4 for GCC, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 124/153: schannel: client certificate store opening fix, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 125/153: README: add appveyor build badge [ci skip], gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 109/153: x509asn1: make several functions static, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 136/153: Don't use Windows path %PWD for SSH tests, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 147/153: sftp: don't send post-qoute sequence when retrying a connection, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 72/153: README.md: add LGTM.com code quality grade for C/C++, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 107/153: http2: avoid set_stream_user_data() before stream is assigned, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 118/153: http2: abort the send_callback if not setup yet, gnunet, 2018/09/11