]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
regcomp: use unsigned char when testing for escapes
authorChristos Zoulas <christos@NetBSD.org>
Wed, 30 Aug 2023 20:37:24 +0000 (20:37 +0000)
committerEd Maste <emaste@FreeBSD.org>
Wed, 8 Nov 2023 00:59:51 +0000 (19:59 -0500)
commit67264bfe499223cd9864b53975462e3eb57cde2c
tree9af7ce7ec31ed7fd991e6bf95ab5553058a079b6
parente79edfaf68c542c8545670e911ae83ca0e3493b5
regcomp: use unsigned char when testing for escapes

- cast GETNEXT to unsigned where it is being promoted to int to prevent
  sign-extension (really it would have been better for PEEK*() and
  GETNEXT() to return unsigned char; this would have removed a ton of
  (uch) casts, but it is too intrusive for now).
- fix an isalpha that should have been iswalpha

PR: 264275, 274032
Reviewed by: kevans, eugen (previous version)
Obtained from: NetBSD

(cherry picked from commit 3fb80f1476c7776f04ba7ef6d08397cef6abcfb0)
(cherry picked from commit ac695744e2cfb461a64018276fb94999fb0cad9c)

Approved by: so
Security: FreeBSD-EN-23:14
lib/libc/regex/regcomp.c