]> git.street.me.uk Git - andy/viking.git/commitdiff
Increase buffer length
authorGuilhem Bonnefille <guilhem.bonnefille@gmail.com>
Sun, 26 Sep 2010 14:31:44 +0000 (16:31 +0200)
committerGuilhem Bonnefille <guilhem.bonnefille@gmail.com>
Mon, 11 Oct 2010 21:06:26 +0000 (23:06 +0200)
I think 50 is too small as etag contains 36 characters
and header contains 15 characters.

src/curl_download.c

index 2e7a7ef9eeda0a11accceb100734c6e7610aafc4..42841bbe0a364670212fe12306dc657de9c94804 100644 (file)
@@ -173,8 +173,8 @@ int curl_download_uri ( const char *uri, FILE *f, DownloadMapOptions *options, D
       if (options->use_etag) {
         if (file_options->etag != NULL) {
           /* add an header on the HTTP request */
-          char str[50];
-          g_snprintf(str, 50, "If-None-Match: %s", file_options->etag);
+          char str[60];
+          g_snprintf(str, 60, "If-None-Match: %s", file_options->etag);
           curl_send_headers = curl_slist_append(curl_send_headers, str);
           curl_easy_setopt ( curl, CURLOPT_HTTPHEADER , curl_send_headers);
         }