summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2018-05-06 02:27:01 -0600
committerKarl Williamson <khw@cpan.org>2018-05-19 09:01:21 -0600
commitda3e33cb2fa26a1a8e0a306a52627e80e6677ae7 (patch)
treea341a140f7c0443a737fdb6f369c464a1ebc8755
parent3cacfe74edaec4b2b1289e9809e4e68a2bf5b851 (diff)
downloadperl-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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/utf8.c b/utf8.c
index ceb4723113..ec67b08d50 100644
--- a/utf8.c
+++ b/utf8.c
@@ -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;
}