-
Notifications
You must be signed in to change notification settings - Fork 9.1k
WriteCharsLegacy: Add some notes in comments and rename WC_ECHO #9605
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
WC_ECHO only gates whether a control character Ctrl+X is rendered as "^X" or acted upon.
| // WCL-NOTE: We should never hit this. | ||
| // WCL-NOTE: 1. Normal characters are handled via the early check for IS_GLYPH_CHAR | ||
| // WCL-NOTE: 2. Control characters are handled via the CtrlChar label (if WC_PRINTABLE_CONTROL_CHARS is on) | ||
| // WCL-NOTE: And if they are control characters they will trigger the C1_CNTRL check above. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was observed by fuzzing for ~10 minutes with WC_PRINTABLE_CONTROL_CHARS on or off.
|
Since @j4james has touched this code, this mention is advisory. I've been fuzzing WriteCharsLegacy and using it as a way to generate inputs that satisfy every branch in this function. 😁 |
miniksa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff. Normally I'd nag for GH: ID for the bits that are now documented as known wrong... but there's honestly no point. So let's do this.
|
The SA failure is a checkout failure, not a build failure. This passes SA as it it does not change any code. |
This commit clarifies some things inside WriteCharsLegacy by adding
comments and renaming parameter and enum names. It does not change any
logic.
WC_ECHOwas used extensively to mean only one thing: whether to printa control character like
\x18(Ctrl+X) as^X. It's beenrenamed to make that abundantly clear.