summaryrefslogtreecommitdiff
path: root/mathoms.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2018-07-30 21:41:44 -0600
committerKarl Williamson <khw@cpan.org>2018-08-03 13:13:24 -0600
commit2951abb4de83bfd534d332144e6a0bb3e2aaecdc (patch)
tree05ecab2a4c7a3d472216dc3d9ae57d86c16d68a5 /mathoms.c
parent5ac3601b965b993adcea616254df8de3c66f6ef6 (diff)
downloadperl-2951abb4de83bfd534d332144e6a0bb3e2aaecdc.tar.gz
Make utf8_to_uvchr() slightly safer
Recent commit aa3c16bd709ef9b9c8c785af48f368e08f70c74b made this function safe if the input is a NUL-terminated string. But if not, it can read past the end of the buffer. It used as a limit the maximum length a UTF-8 code point can be. But most code points in real-world use aren't nearly that long, and we know how long that can be by looking at the first byte. Therefore, use the length determined by the first byte as the limit instead of the maximum possible.
Diffstat (limited to 'mathoms.c')
0 files changed, 0 insertions, 0 deletions