mirror of
https://github.com/curl/curl.git
synced 2026-07-17 14:07:16 +03:00
parent
db02e0e980
commit
307b7543ea
19 changed files with 26 additions and 26 deletions
|
|
@ -138,7 +138,7 @@ CURLcode Curl_base64_decode(const char *src,
|
|||
/* Calculate the size of the decoded string */
|
||||
rawlen = (numQuantums * 3) - padding;
|
||||
|
||||
/* Allocate our buffer including room for a zero terminator */
|
||||
/* Allocate our buffer including room for a null-terminator */
|
||||
newstr = malloc(rawlen + 1);
|
||||
if(!newstr)
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
|
|
|
|||
|
|
@ -279,7 +279,7 @@ Curl_he2ai(const struct hostent *he, int port)
|
|||
|
||||
for(i = 0; (curr = he->h_addr_list[i]) != NULL; i++) {
|
||||
size_t ss_size;
|
||||
size_t namelen = strlen(he->h_name) + 1; /* include zero termination */
|
||||
size_t namelen = strlen(he->h_name) + 1; /* include null-terminatior */
|
||||
#ifdef ENABLE_IPV6
|
||||
if(he->h_addrtype == AF_INET6)
|
||||
ss_size = sizeof(struct sockaddr_in6);
|
||||
|
|
|
|||
|
|
@ -792,7 +792,7 @@ doh2ai(const struct dohentry *de, const char *hostname, int port)
|
|||
#endif
|
||||
CURLcode result = CURLE_OK;
|
||||
int i;
|
||||
size_t hostlen = strlen(hostname) + 1; /* include zero terminator */
|
||||
size_t hostlen = strlen(hostname) + 1; /* include null-terminator */
|
||||
|
||||
if(!de)
|
||||
/* no input == no output! */
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
struct dynbuf {
|
||||
char *bufr; /* point to a null-terminated allocated buffer */
|
||||
size_t leng; /* number of bytes *EXCLUDING* the zero terminator */
|
||||
size_t leng; /* number of bytes *EXCLUDING* the null-terminator */
|
||||
size_t allc; /* size of the current allocation */
|
||||
size_t toobig; /* size limit for the buffer */
|
||||
#ifdef DEBUGBUILD
|
||||
|
|
|
|||
|
|
@ -259,7 +259,7 @@ static CURLcode unfold_value(struct Curl_easy *data, const char *value,
|
|||
|
||||
/* put the data at the end of the previous data, not the newline */
|
||||
memcpy(&newhs->value[olen], value, vlen);
|
||||
newhs->value[olen + vlen] = 0; /* zero terminate at newline */
|
||||
newhs->value[olen + vlen] = 0; /* null-terminate at newline */
|
||||
|
||||
/* insert this node into the list of headers */
|
||||
Curl_llist_insert_next(&data->state.httphdrs, data->state.httphdrs.tail,
|
||||
|
|
|
|||
|
|
@ -956,7 +956,7 @@ static int dprintf_formatf(
|
|||
else
|
||||
*fptr++ = 'f';
|
||||
|
||||
*fptr = 0; /* and a final zero termination */
|
||||
*fptr = 0; /* and a final null-termination */
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ CURLcode Curl_rand(struct Curl_easy *data, unsigned char *rnd, size_t num)
|
|||
|
||||
/*
|
||||
* Curl_rand_hex() fills the 'rnd' buffer with a given 'num' size with random
|
||||
* hexadecimal digits PLUS a zero terminating byte. It must be an odd number
|
||||
* hexadecimal digits PLUS a null-terminating byte. It must be an odd number
|
||||
* size.
|
||||
*/
|
||||
|
||||
|
|
@ -235,7 +235,7 @@ CURLcode Curl_rand_hex(struct Curl_easy *data, unsigned char *rnd,
|
|||
/* make sure it fits in the local buffer and that it is an odd number! */
|
||||
return CURLE_BAD_FUNCTION_ARGUMENT;
|
||||
|
||||
num--; /* save one for zero termination */
|
||||
num--; /* save one for null-termination */
|
||||
|
||||
result = Curl_rand(data, buffer, num/2);
|
||||
if(result)
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ CURLcode Curl_rand(struct Curl_easy *data, unsigned char *rnd, size_t num);
|
|||
|
||||
/*
|
||||
* Curl_rand_hex() fills the 'rnd' buffer with a given 'num' size with random
|
||||
* hexadecimal digits PLUS a zero terminating byte. It must be an odd number
|
||||
* hexadecimal digits PLUS a null-terminating byte. It must be an odd number
|
||||
* size.
|
||||
*/
|
||||
CURLcode Curl_rand_hex(struct Curl_easy *data, unsigned char *rnd,
|
||||
|
|
|
|||
|
|
@ -382,7 +382,7 @@ CURLcode Curl_auth_create_digest_md5_message(struct Curl_easy *data,
|
|||
if(!(qop_values & DIGEST_QOP_VALUE_AUTH))
|
||||
return CURLE_BAD_CONTENT_ENCODING;
|
||||
|
||||
/* Generate 32 random hex chars, 32 bytes + 1 zero termination */
|
||||
/* Generate 32 random hex chars, 32 bytes + 1 null-termination */
|
||||
result = Curl_rand_hex(data, (unsigned char *)cnonce, sizeof(cnonce));
|
||||
if(result)
|
||||
return result;
|
||||
|
|
|
|||
|
|
@ -658,7 +658,7 @@ CURLcode Curl_auth_create_ntlm_type3_message(struct Curl_easy *data,
|
|||
/* LanManager response */
|
||||
/* NT response */
|
||||
|
||||
0, /* zero termination */
|
||||
0, /* null-termination */
|
||||
0, 0, 0, /* type-3 long, the 24 upper bits */
|
||||
|
||||
SHORTPAIR(0x18), /* LanManager response length, twice */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue