]> 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)
committerYuri Pankov <yuripv@FreeBSD.org>
Mon, 25 Sep 2023 22:49:14 +0000 (00:49 +0200)
commit3fb80f1476c7776f04ba7ef6d08397cef6abcfb0
tree5ebb69d87daa00bfe6acc8b78e89d7913084b3fa
parent61f8df6a13a357e1d45c22a2016b87491f10de87
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
Differential Revision: https://reviews.freebsd.org/D41947
lib/libc/regex/regcomp.c