lib: add a Curl_bufref_uptr() function and use it

Function Curl_bufref_ptr() now returns a const char *.
New function Curl_bufref_uptr() returns a const unsigned char *.

Usage and doc updated.

Closes #19827
This commit is contained in:
Patrick Monnerat 2025-12-03 18:36:03 +01:00 committed by Daniel Stenberg
parent 39d1976b7f
commit f39b8a1174
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
13 changed files with 40 additions and 23 deletions

View file

@ -255,7 +255,7 @@ static CURLcode ntlm_decode_type2_target(struct Curl_easy *data,
{
unsigned short target_info_len = 0;
unsigned int target_info_offset = 0;
const unsigned char *type2 = Curl_bufref_ptr(type2ref);
const unsigned char *type2 = Curl_bufref_uptr(type2ref);
size_t type2len = Curl_bufref_len(type2ref);
#ifdef CURL_DISABLE_VERBOSE_STRINGS
@ -355,7 +355,7 @@ CURLcode Curl_auth_decode_ntlm_type2_message(struct Curl_easy *data,
*/
CURLcode result = CURLE_OK;
const unsigned char *type2 = Curl_bufref_ptr(type2ref);
const unsigned char *type2 = Curl_bufref_uptr(type2ref);
size_t type2len = Curl_bufref_len(type2ref);
#ifdef CURL_DISABLE_VERBOSE_STRINGS