ygrek / ocurl

OCaml bindings to libcurl
https://ygrek.org/p/ocurl
MIT License
59 stars 32 forks source link

Fixed: CURLOPT_DNS_SERVERS + Curl.duphandle in curl-helper.c #5

Closed bgraf closed 10 years ago

bgraf commented 10 years ago

...r.c

Given a handle with CURLOPT_DNS_SERVERS set, a duplicate would still point to the same argument memory location, as the argument isn't set anew in duplicateConnection(..). The original could be garbage collected and the space used otherwise, while the duplicate would still point to it, potentially leading to errors during Curl.perform on the duplicate.

I couldn't produce that exact error, although it could be shown that the argument is not copied. Therefore this error could be possible.

Greetings

ygrek commented 10 years ago

Thanks!