diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2016-08-11 19:53:30 -0400 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2016-08-11 22:51:08 -0400 |
commit | 5208a0305e9e82c534fa034515d54a0409dfcc77 (patch) | |
tree | 78c2bf136f9bda472d82d7f9c0d8210facf102be /sv.c | |
parent | 749d85343f3cdb65891a5fe3b9f55ef3a5b03ca8 (diff) | |
download | perl-5208a0305e9e82c534fa034515d54a0409dfcc77.tar.gz |
Fix on top of 75326c48.
Worked partly accidentally, and as a bonus caused asan
off-stack-variable read violations.
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -12517,12 +12517,12 @@ Perl_sv_vcatpvfn_flags(pTHX_ SV *const sv, const char *const pat, const STRLEN p bool overflow = FALSE; if (v0[precis + 1] < 0x8) { /* Round down, nothing to do. */ - } else if (v[precis + 1] > 0x8) { + } else if (v0[precis + 1] > 0x8) { /* Round up. */ - v0[precis + 1]++; - overflow = v0[precis + 1] > 0xF; - v0[precis + 1] &= 0xF; - } else { /* v[precis + 1] == 0x8 */ + v0[precis]++; + overflow = v0[precis] > 0xF; + v0[precis] &= 0xF; + } else { /* v0[precis] == 0x8 */ /* Half-point: round towards the one * with the even least-significant digit: * 08 -> 0 88 -> 8 |