]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
glob: pass an 'int' as len when using printf's %*s
authorDaniel Stenberg <daniel@haxx.se>
Wed, 30 Jun 2021 10:47:43 +0000 (12:47 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 30 Jun 2021 12:05:56 +0000 (14:05 +0200)
Detected by Coverity CID 1486629.

Closes #7324

src/tool_urlglob.c

index cfce1732aa8c2c291f556b9fa4f63f30aea3b287..df882b28a976b1a8429f1a1c6d16a48143104975 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, 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
@@ -472,7 +472,7 @@ CURLcode glob_url(struct URLGlob **glob, char *url, unsigned long *urlnum,
       if(glob_expand->pos) {
         msnprintf(text, sizeof(text), "%s in URL position %zu:\n%s\n%*s^",
                   glob_expand->error,
-                  glob_expand->pos, url, glob_expand->pos - 1, " ");
+                  glob_expand->pos, url, (int)glob_expand->pos - 1, " ");
         t = text;
       }
       else