Skip to content

ctype: exclude control bytes from ISPRINT and ISGRAPH - #22371

Closed
alhudz wants to merge 1 commit into
curl:masterfrom
alhudz:ctype-print-control-bytes
Closed

ctype: exclude control bytes from ISPRINT and ISGRAPH#22371
alhudz wants to merge 1 commit into
curl:masterfrom
alhudz:ctype-print-control-bytes

Conversation

@alhudz

@alhudz alhudz commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Repro: with the bundled fnmatch (a build without a system fnmatch, such as Windows), match any byte in 0x09-0x0d (\t \n \v \f \r) against [[:print:]] or [[:graph:]]; unit1307 gains those cases.
Cause: ISPRINT and ISGRAPH fold in the 0x09-0x0d range, so a byte there is reported as both printable and ISCNTRL, unlike C/POSIX where the two are disjoint.
Fix: drop that range from ISPRINT/ISGRAPH so they agree with ISCNTRL. The same misclassification let the LDAP-to-LDIF writer's !ISPRINT guard write a server value containing CR/LF raw into the line-oriented format instead of base64-encoding it.

@github-actions github-actions Bot added the tests label Jul 23, 2026
@bagder bagder closed this in 489a4c1 Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants