]> granicus.if.org Git - curl/commitdiff
darwinssi: fix error: variable length array used
authorDaniel Stenberg <daniel@haxx.se>
Wed, 16 Aug 2017 05:58:44 +0000 (07:58 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 16 Aug 2017 05:58:44 +0000 (07:58 +0200)
lib/vtls/darwinssl.c

index 6f9c6012e8fd920c3ceb473a8e6b4c7bc27297e5..18751ca4906e962f0fd43dc70af1a23a9b60ff2f 100644 (file)
@@ -1797,7 +1797,7 @@ static int read_cert(const char *file, unsigned char **out, size_t *outlen)
 {
   int fd;
   ssize_t n, len = 0, cap = 512;
-  unsigned char buf[cap], *data;
+  unsigned char buf[512], *data;
 
   fd = open(file, 0);
   if(fd < 0)