Repository navigation
Conversation
9 tasks done
wcsdup() in favor of _wcsdup()_wcsdup() over deprecated wcsdup()
Member
Author
Member
Author
|
Same has been reported last year under the original PR: |
Member
|
It looks like |
vszakats
marked this pull request as draft
July 7, 2025 10:47
Member
I was only referring to callers, users of this functionality. |
Member
Author
|
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
vszakats
added a commit
to vszakats/curl
that referenced
this pull request
Jul 7, 2025
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
vszakats
marked this pull request as ready for review
July 7, 2025 11:27
vszakats
added a commit
to vszakats/curl
that referenced
this pull request
Jul 7, 2025
Follow-up to ef2ccf8 curl#17840
vszakats
added a commit
to vszakats/curl
that referenced
this pull request
Jul 7, 2025
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
vszakats
added a commit
that referenced
this pull request
Jul 8, 2025
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
vszakats
added a commit
to vszakats/curl
that referenced
this pull request
Jul 25, 2025
vszakats
added a commit
that referenced
this pull request
Jul 25, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Also ban them via
checksrc.The code continues to use
_tcsdup().Assisted-by: Daniel Stenberg
Closes #17840
curl_wcsdup_callbackcallback #17843