mirror of
https://github.com/curl/curl.git
synced 2026-08-24 22:43:38 +03:00
url: check sasl additional parameters for connection reuse.
Also move static function safecmp() as non-static Curl_safecmp() since its purpose is needed at several places. Bug: https://curl.se/docs/CVE-2022-22576.html CVE-2022-22576 Closes #8746
This commit is contained in:
parent
ff2f3e8367
commit
852aa5ad35
5 changed files with 31 additions and 16 deletions
|
|
@ -131,6 +131,16 @@ void Curl_strntolower(char *dest, const char *src, size_t n)
|
|||
} while(*src++ && --n);
|
||||
}
|
||||
|
||||
/* Compare case-sensitive NUL-terminated strings, taking care of possible
|
||||
* null pointers. Return true if arguments match.
|
||||
*/
|
||||
bool Curl_safecmp(char *a, char *b)
|
||||
{
|
||||
if(a && b)
|
||||
return !strcmp(a, b);
|
||||
return !a && !b;
|
||||
}
|
||||
|
||||
/* --- public functions --- */
|
||||
|
||||
int curl_strequal(const char *first, const char *second)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue