* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2017, 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
if(data) {
size_t len = strlen(data);
+ if(size*nmemb < len) {
+ fprintf(stderr, "read buffer is too small to run test\n");
+ return 0;
+ }
memcpy(ptr, data, len);
pooh->counter++; /* advance pointer */
return len;
int test(char *URL)
{
CURL *curl;
- CURLcode res=CURLE_OK;
+ CURLcode res = CURLE_OK;
struct curl_slist *slist = NULL;
struct WriteThis pooh;
pooh.counter = 0;