diff options
author | Karl Williamson <khw@cpan.org> | 2018-05-06 02:27:01 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2018-05-19 09:01:21 -0600 |
commit | da3e33cb2fa26a1a8e0a306a52627e80e6677ae7 (patch) | |
tree | a341a140f7c0443a737fdb6f369c464a1ebc8755 | |
parent | 3cacfe74edaec4b2b1289e9809e4e68a2bf5b851 (diff) | |
download | perl-da3e33cb2fa26a1a8e0a306a52627e80e6677ae7.tar.gz |
PATCH: [perl # 133179] heap-buffer-overflow write
The code did not consider the case of a trailing slash with no
denominator following it. Simply add a check.
-rw-r--r-- | utf8.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -6118,8 +6118,8 @@ Perl_parse_uniprop_string(pTHX_ const char * const name, const Size_t len, const lookup_name[j++] = cur; - /* Unless this is a slash, we are done with it */ - if (cur != '/') { + /* Unless this is a non-trailing slash, we are done with it */ + if (i >= len - 1 || cur != '/') { continue; } |