summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-05-28 16:32:07 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-05-28 23:33:56 +0200
commit2110b996a6e9b8271d381c4204b5b930b762dc58 (patch)
tree5d6c260d9ddf7a4adb60ccefb9276bd09489b506 /configure.ac
parent3a2ca60d6a7540d631df90807275da0ff25eca04 (diff)
downloadcurl-2110b996a6e9b8271d381c4204b5b930b762dc58.tar.gz
configure: repair the check if argv can be written to
Due to bad escaping of the test code, the test wouldn't build and thus result in a negative test result, which would lead to the unconditional assumption that overwriting the arguments doesn't work and thus curl would never hide credentials given in the command line, even when it would otherwise be possible. Regression from commit 2d4c2152c (7.60.0) Reported-by: huzunhao on github Fixes #5470 Closes #5471
Diffstat (limited to 'configure.ac')
-rwxr-xr-xconfigure.ac12
1 files changed, 7 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 0c1decc72..8161eee94 100755
--- a/configure.ac
+++ b/configure.ac
@@ -1282,12 +1282,14 @@ dnl Check if the operating system allows programs to write to their own argv[]
dnl **********************************************************************
AC_MSG_CHECKING([if argv can be written to])
-CURL_RUN_IFELSE([
-int main(int argc, char ** argv) {
- argv[0][0] = ' ';
- return (argv[0][0] == ' ')?0:1;
+CURL_RUN_IFELSE([[
+int main(int argc, char **argv)
+{
+ (void)argc;
+ argv[0][0] = ' ';
+ return (argv[0][0] == ' ')?0:1;
}
-],[
+]],[
curl_cv_writable_argv=yes
],[
curl_cv_writable_argv=no