From: Max Eliaser Date: Sat, 19 Apr 2025 21:08:06 +0000 (-0700) Subject: CURLOPT_ERRORBUFFER.md: the buffer is read only after curl takes ownership X-Git-Tag: curl-8_14_0~256 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b375b8b91ea3c84d71e9f2111b6d73f2c2d1d24;p=thirdparty%2Fcurl.git CURLOPT_ERRORBUFFER.md: the buffer is read only after curl takes ownership Clarifies #17100 Closes #17105 --- diff --git a/docs/libcurl/opts/CURLOPT_ERRORBUFFER.md b/docs/libcurl/opts/CURLOPT_ERRORBUFFER.md index c8f75b161e..61bdab4d8a 100644 --- a/docs/libcurl/opts/CURLOPT_ERRORBUFFER.md +++ b/docs/libcurl/opts/CURLOPT_ERRORBUFFER.md @@ -45,6 +45,10 @@ Since 7.60.0 libcurl initializes the contents of the error buffer to an empty string before performing the transfer. For earlier versions if an error code was returned but there was no error detail then the buffer was untouched. +Do not attempt to set the contents of the buffer yourself, including in any +callbacks you write that may be called by libcurl. The library may overwrite +the buffer after your callback returns. + Consider CURLOPT_VERBOSE(3) and CURLOPT_DEBUGFUNCTION(3) to better debug and trace why errors happen.