Skip to content

telnet: fix old copy-paste typo in variable name#21979

Closed
vszakats wants to merge 1 commit into
curl:masterfrom
vszakats:telnetvartypomaybe
Closed

telnet: fix old copy-paste typo in variable name#21979
vszakats wants to merge 1 commit into
curl:masterfrom
vszakats:telnetvartypomaybe

Conversation

@vszakats

@vszakats vszakats commented Jun 11, 2026

Copy link
Copy Markdown
Member

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.)

@vszakats vszakats marked this pull request as draft June 11, 2026 22:49
Reported by GitHub Code Quality

Follow-up to ae1912c

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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] with tn->usq[option] in rec_do() (local option negotiation path).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vszakats vszakats marked this pull request as ready for review June 12, 2026 01:04
@vszakats vszakats requested a review from bagder June 12, 2026 08:14
@vszakats vszakats changed the title telnet: possible variable name typo? telnet: possible variable name typo [QUESTION] Jun 12, 2026

@bagder bagder left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@vszakats vszakats changed the title telnet: possible variable name typo [QUESTION] telnet: possible variable name typo Jun 12, 2026
@vszakats vszakats changed the title telnet: possible variable name typo telnet: fix old copy-paste typo in variable name Jun 12, 2026
@vszakats vszakats closed this in 4f53234 Jun 12, 2026
@vszakats vszakats deleted the telnetvartypomaybe branch June 12, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants