mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:21:41 +03:00
urlapi: use U_CURLU_URLDECODE when toggling it off unsigned
In this use case 'unsigned value &= ~DEFINE; As otherwise the right side is treated as signed, which annoyingly triggers UBSan. The U_* defines are local versions of the public define, only typecast to unsigned. Reported-by: xmoezzz on github Fixes #20753 Closes #20769
This commit is contained in:
parent
cc85cdf3c5
commit
3d708e239b
2 changed files with 6 additions and 3 deletions
|
|
@ -37,4 +37,7 @@ UNITTEST CURLUcode Curl_parse_port(struct Curl_URL *u, struct dynbuf *host,
|
|||
bool has_scheme);
|
||||
#endif
|
||||
|
||||
#define U_CURLU_URLDECODE (unsigned int)CURLU_URLDECODE
|
||||
#define U_CURLU_PATH_AS_IS (unsigned int)CURLU_PATH_AS_IS
|
||||
|
||||
#endif /* HEADER_CURL_URLAPI_INT_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue