-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
memory: stop overriding unused wcsdup()
/_wcsdup()
system functions
#17840
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
wcsdup()
in favor of _wcsdup()
_wcsdup()
over deprecated wcsdup()
Same has been reported last year under the original PR: |
It looks like |
Indeed! Except when assigning the function to Lines 43 to 45 in f048546
Lines 160 to 162 in f048546
As opposed to this fixed instance: Lines 132 to 134 in f048546
|
I was only referring to callers, users of this functionality. |
Got it now! So, deleted both macro redefs, since those are necessary for actual calls, Then fixed to use |
Also ban them via `checksrc`. The code continues to use `_tcsdup()`. Closes curl#17840
Also: - add two related casts to match rest of code. - replace deprecated `wcsdup` with `_wcsdup` in libtests. Ref: https://learn.microsoft.com/cpp/c-runtime-library/reference/strdup-wcsdup Follow-up to 76e047f curl#7540 Bug: curl#17840 (comment) Bug: curl#7540 (comment) Closes curl#17840
_wcsdup()
over deprecated wcsdup()
wcsdup()
/_wcsdup()
system functions
Follow-up to ef2ccf8 curl#17840
Also: - add two related casts to match rest of code. - replace deprecated `wcsdup` with `_wcsdup` in libtests. Ref: https://learn.microsoft.com/cpp/c-runtime-library/reference/strdup-wcsdup Follow-up to 76e047f curl#7540 Bug: curl#17840 (comment) Bug: curl#7540 (comment) Closes curl#17840
This callback was permanently mapped to libcurl's internal `Curl_wcsdup()`, which always uses the customizable malloc for allocation, thus making a custom mapping redundant anyway. To simplify, drop the callback and map `_tcsdup()` in Unicode mode directly to `Curl_wcsdup()`. Also fixes: - `curl_global_init()` which, before this patch, (re)initialized its mapping to `_wcsdup()`, returning buffers potentially incompatible with a custom allocator. Bug: #17840 (comment) Bug: #7540 (comment) Co-reported-by: Luca Kellermann Follow-up to 76e047f #7540 Assisted-by: Jay Satiro Closes #17843
Also ban them via
checksrc
.The code continues to use
_tcsdup()
.Assisted-by: Daniel Stenberg
Closes #17840
curl_wcsdup_callback
callback #17843