mirror of
https://github.com/curl/curl.git
synced 2026-08-25 02:33:31 +03:00
lib: accept larger input to md5/hmac/sha256/sha512 functions
Avoid unchecked data conversions from size_t to unsigned int. Reported-by: James Fuller Closes #21174
This commit is contained in:
parent
1570091f10
commit
dd7fcd581f
7 changed files with 41 additions and 20 deletions
|
|
@ -57,14 +57,14 @@ struct HMAC_context {
|
|||
struct HMAC_context *Curl_HMAC_init(const struct HMAC_params *hashparams,
|
||||
const unsigned char *key,
|
||||
unsigned int keylen);
|
||||
int Curl_HMAC_update(struct HMAC_context *ctxt,
|
||||
const unsigned char *data,
|
||||
unsigned int len);
|
||||
void Curl_HMAC_update(struct HMAC_context *ctxt,
|
||||
const unsigned char *data,
|
||||
unsigned int len);
|
||||
int Curl_HMAC_final(struct HMAC_context *ctxt, unsigned char *output);
|
||||
|
||||
CURLcode Curl_hmacit(const struct HMAC_params *hashparams,
|
||||
const unsigned char *key, const size_t keylen,
|
||||
const unsigned char *data, const size_t datalen,
|
||||
const unsigned char *data, size_t datalen,
|
||||
unsigned char *output);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue