diff options
author | Niko Tyni <ntyni@debian.org> | 2013-05-09 21:49:16 +0300 |
---|---|---|
committer | Ricardo Signes <rjbs@cpan.org> | 2013-05-10 21:41:45 -0400 |
commit | 0157ef98f2758c1571b03548125e2b193caff16d (patch) | |
tree | da14c183d3b92a5b48b6d953e43e1210e0422821 /pp.c | |
parent | 237b9c6d16c0bc18807193662438b0c12788f79a (diff) | |
download | perl-0157ef98f2758c1571b03548125e2b193caff16d.tar.gz |
Fix -Wformat-security issues
Building with -Accflags="-Wformat -Werror=format-security"
triggers format string warnings from gcc.
As gcc can't tell that all the strings are constant here,
explicitly pass separate format strings to make it happy.
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1654,7 +1654,7 @@ PP(pp_repeat) MEM_WRAP_CHECK_1(max, SV*, oom_list_extend); /* Did the max computation overflow? */ if (items > 0 && max > 0 && (max < items || max < count)) - Perl_croak(aTHX_ oom_list_extend); + Perl_croak(aTHX_ "%s", oom_list_extend); MEXTEND(MARK, max); if (count > 1) { while (SP > MARK) { @@ -1712,7 +1712,7 @@ PP(pp_repeat) else { const STRLEN max = (UV)count * len; if (len > MEM_SIZE_MAX / count) - Perl_croak(aTHX_ oom_string_extend); + Perl_croak(aTHX_ "%s", oom_string_extend); MEM_WRAP_CHECK_1(max, char, oom_string_extend); SvGROW(TARG, max + 1); repeatcpy(SvPVX(TARG) + len, SvPVX(TARG), len, count - 1); |