Commit a5b231ac authored by Alexander Klauer's avatar Alexander Klauer Committed by Daniel Stenberg
Browse files

lib/url.c: Generic read/write data pointers

Always interprets the pointer passed with the CURLOPT_WRITEDATA or
CURLOPT_READDATA options of curl_easy_setopt() as a void pointer in
order to avoid problems in environments where FILE and void pointers
have non-trivial conversion.
parent 790abe3f
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1394,9 +1394,10 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
    break;
  case CURLOPT_FILE:
    /*
     * FILE pointer to write to or include in the data write callback
     * FILE pointer to write to. Or possibly
     * used as argument to the write callback.
     */
    data->set.out = va_arg(param, FILE *);
    data->set.out = va_arg(param, void *);
    break;
  case CURLOPT_FTPPORT:
    /*
@@ -1437,7 +1438,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
     * FILE pointer to read the file to be uploaded from. Or possibly
     * used as argument to the read callback.
     */
    data->set.in = va_arg(param, FILE *);
    data->set.in = va_arg(param, void *);
    break;
  case CURLOPT_INFILESIZE:
    /*