From 0157ef98f2758c1571b03548125e2b193caff16d Mon Sep 17 00:00:00 2001 From: Niko Tyni Date: Thu, 9 May 2013 21:49:16 +0300 Subject: 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. --- pp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pp.c') diff --git a/pp.c b/pp.c index 6da9970356..ed6fd5fd2c 100644 --- a/pp.c +++ b/pp.c @@ -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); -- cgit v1.2.1