telnet: fix old copy-paste typo in variable name#21979
Closed
vszakats wants to merge 1 commit into
Closed
Conversation
Reported by GitHub Code Quality Follow-up to ae1912c
9128713 to
92675bb
Compare
There was a problem hiding this comment.
Pull request overview
Fixes a telnet option negotiation state bug in lib/telnet.c by correcting which negotiation-queue array is reset when handling a CURL_OPPOSITE transition in rec_do() (local “us” side), aligning it with the surrounding us/usq state machine logic.
Changes:
- Replace an incorrect reset of
tn->himq[option]withtn->usq[option]inrec_do()(local option negotiation path).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
bagder
approved these changes
Jun 12, 2026
bagder
left a comment
Member
There was a problem hiding this comment.
This existed like this in the original implementation I believe, but looking at the surrounding code this appears to be the correct fix. It is unfortunate that we don't have test cases enough to exercise these code paths.
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.
This code lacks tests, though we agreed it looks plausible enough to
merge it based on surrounding code. Even though this line has been
present for a long time. If you use this code, please report any results
or issues.
Reported by GitHub Code Quality
Follow-up to ae1912c
(It seems plausible, but not knowing the code, I can't tell for sure.
It's also been there for possibly 3 decades without someone noticing.)