-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
krb5: fix socket confusion, MSVC compiler warnings #15585
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
Closed
Closed
Conversation
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
Thank you for your fix! 🎉 |
``` D:\a\curl\curl\lib\krb5.c(288,1): warning C4701: potentially uninitialized local variable '_gssresp' used ``` https://github.com/curl/curl/actions/runs/11848626645/job/33020501026?pr=15585#step:9:31
``` D:\a\curl\curl\lib\krb5.c(370,1): warning C4702: unreachable code ``` https://github.com/curl/curl/actions/runs/11848626645/job/33020501026?pr=15585#step:9:30
Add gssapi to openssl job waiting for: - [x] curl#15564 - [x] curl#15545 Closes curl#15549
Analysis of PR #15585 at 7a430ccc: Test 3028 failed, which has NOT been flaky recently, so there could be a real issue in this PR. Generated by Testclutch |
vszakats
pushed a commit
that referenced
this pull request
Nov 15, 2024
pps83
pushed a commit
to pps83/curl
that referenced
this pull request
Apr 26, 2025
- fix socket/sockindex confusion on writes: The callstack used to end with `Curl_write_plain()` accepting a socket till 7.87.0. This call got swapped for `Curl_conn_send()`, expecting a sockindex. `socket_write()` was updated accordingly. Its callers missed it and continued operating on sockets: `do_sec_send()`, `sec_write()`, passing it down the stack and `Curl_conn_send()` resolving it as if it were a sockindex. It affected FTP Kerberos authentication. Discovered through MSVC warnings: ``` curl\lib\krb5.c(652,28): warning C4244: 'function': conversion from 'curl_socket_t' to 'int', possible loss of data curl\lib\krb5.c(654,28): warning C4244: 'function': conversion from 'curl_socket_t' to 'int', possible loss of data curl\lib\krb5.c(656,26): warning C4244: 'function': conversion from 'curl_socket_t' to 'int', possible loss of data curl\lib\krb5.c(657,26): warning C4244: 'function': conversion from 'curl_socket_t' to 'int', possible loss of data curl\lib\krb5.c(665,24): warning C4244: 'function': conversion from 'curl_socket_t' to 'int', possible loss of data curl\lib\krb5.c(666,24): warning C4244: 'function': conversion from 'curl_socket_t' to 'int', possible loss of data ``` Ref: https://github.com/curl/curl/actions/runs/11846599621/job/33014592805#step:9:32 Follow-up to 5651a36 curl#10280 Bug: curl#15549 (comment) Fixes curl#15582 - fix uninitialized buffer: ``` curl\lib\krb5.c(288,1): warning C4701: potentially uninitialized local variable '_gssresp' used ``` Ref: https://github.com/curl/curl/actions/runs/11848626645/job/33020501026?pr=15585#step:9:31 - silence unreachable code compiler warning: ``` curl\lib\krb5.c(370,1): warning C4702: unreachable code ``` Ref: https://github.com/curl/curl/actions/runs/11848626645/job/33020501026?pr=15585#step:9:30 Closes curl#15585
pps83
pushed a commit
to pps83/curl
that referenced
this pull request
Apr 26, 2025
Ref: curl#15545 Ref: curl#15564 Ref: curl#15585 Closes curl#15549
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.
fix socket/sockindex confusion on writes:
The callstack used to end with
Curl_write_plain()
accepting a sockettill 7.87.0. This call got swapped for
Curl_conn_send()
, expectinga sockindex.
socket_write()
was updated accordingly. Its callersmissed it and continued operating on sockets:
do_sec_send()
,sec_write()
, passing it down the stack andCurl_conn_send()
resolving it as if it was a sockindex.
It affected FTP Kerberos authentication.
Discovered through MSVC warnings:
Ref: https://github.com/curl/curl/actions/runs/11846599621/job/33014592805#step:9:32
Follow-up to 5651a36 Conn_recv/send_plain refactoring, USE_RECV_BEFORE_SEND_WORKAROUND in cf-socket #10280
Bug: GHA/windows: add gssapi to openssl job #15549 (comment)
Fixes int/socket confusion warnings #15582
fix uninitialized buffer:
Ref: https://github.com/curl/curl/actions/runs/11848626645/job/33020501026?pr=15585#step:9:31
silence unreachable code compiler warning:
Ref: https://github.com/curl/curl/actions/runs/11848626645/job/33020501026?pr=15585#step:9:30