diff options
author | Tony Cook <tony@develop-help.com> | 2015-10-22 12:03:05 +1100 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2015-11-11 13:30:39 +1100 |
commit | 0403a1ad8ff01aaac2d09a986ea6bb5210472459 (patch) | |
tree | 349419ce72afc0861518db58c3bfc280e940ed6b /pp_pack.c | |
parent | fdfd5e4d926a555f6d4f156d79198d8c6db9dc44 (diff) | |
download | perl-0403a1ad8ff01aaac2d09a986ea6bb5210472459.tar.gz |
[perl #126325] don't read past the end of the source for pack [Hh]
With a utf8 target but a non-utf8 source, pack Hh would read past the
end of the source when given a length, due to an incorrect condition.
Diffstat (limited to 'pp_pack.c')
-rw-r--r-- | pp_pack.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2488,7 +2488,7 @@ S_pack_rec(pTHX_ SV *cat, tempsym_t* symptr, SV **beglist, SV **endlist ) if (howlen == e_star) len = fromlen; field_len = (len+1)/2; GROWING(utf8, cat, start, cur, field_len); - if (!utf8 && len > (I32)fromlen) len = fromlen; + if (!utf8_source && len > (I32)fromlen) len = fromlen; bits = 0; l = 0; if (datumtype == 'H') |