]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
noproxy: pointer to local array 'hostip' is stored outside scope
authorDaniel Stenberg <daniel@haxx.se>
Tue, 11 Apr 2023 14:24:29 +0000 (16:24 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 12 Apr 2023 07:00:20 +0000 (09:00 +0200)
Ref: #10929
Closes #10933

lib/noproxy.c

index f1c1ed2c639c5d14677ae441e0faba5a76cadfba..2b9908d8941091056ce7cb28da5626e99ff1de8b 100644 (file)
@@ -122,6 +122,7 @@ enum nametype {
 bool Curl_check_noproxy(const char *name, const char *no_proxy,
                         bool *spacesep)
 {
+  char hostip[128];
   *spacesep = FALSE;
   /*
    * If we don't have a hostname at all, like for example with a FILE
@@ -139,7 +140,6 @@ bool Curl_check_noproxy(const char *name, const char *no_proxy,
     const char *p = no_proxy;
     size_t namelen;
     enum nametype type = TYPE_HOST;
-    char hostip[128];
     if(!strcmp("*", no_proxy))
       return TRUE;