diff options
author | Daniel Stenberg <daniel@haxx.se> | 2022-05-25 10:09:53 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2022-06-26 11:03:57 +0200 |
commit | 20f9dd6bae50b7223171b17ba7798946e74f877f (patch) | |
tree | ec0d36b73f72ea0c754c6deff4bf314986d0d245 /lib/fopen.h | |
parent | 46f8911d3942dc06fdd67e9f6f3908982e5d2fb4 (diff) | |
download | curl-20f9dd6bae50b7223171b17ba7798946e74f877f.tar.gz |
fopen: add Curl_fopen() for better overwriting of files
Bug: https://curl.se/docs/CVE-2022-32207.html
CVE-2022-32207
Reported-by: Harry Sintonen
Closes #9050
Diffstat (limited to 'lib/fopen.h')
-rw-r--r-- | lib/fopen.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/fopen.h b/lib/fopen.h new file mode 100644 index 000000000..289e55f2a --- /dev/null +++ b/lib/fopen.h @@ -0,0 +1,30 @@ +#ifndef HEADER_CURL_FOPEN_H +#define HEADER_CURL_FOPEN_H +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2022, 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 + * are also available at https://curl.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + * SPDX-License-Identifier: curl + * + ***************************************************************************/ + +CURLcode Curl_fopen(struct Curl_easy *data, const char *filename, + FILE **fh, char **tempname); + +#endif |