Skip Menu |

This queue is for tickets about the Prima CPAN distribution.

Report information
The Basics
Id: 106257
Status: resolved
Priority: 0/
Queue: Prima

People
Owner: Nobody in particular
Requestors: ppisar [...] redhat.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.44
Fixed in: (no value)



Subject: GCC -Werror=format-security complains that calling warn( msg); is not safe
Building 1.44 with -Werror=format-security compiler option complains that "warn( msg);" in img/codec_png.c is not safe. That's true because warn() expects formatting string. Attached patch fixes it.
Subject: Prima-1.44-warn-s-first-argument-is-a-formating-string.patch
From cee9d72d34b97c029082538c2e02b493f2a0b04a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com> Date: Wed, 5 Aug 2015 15:37:28 +0200 Subject: [PATCH] warn()'s first argument is a formating string MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GCC -Werror=format-security complains that calling warn( msg); is not safe because the msg argument is interpreted as a formating string, not a string literal. Signed-off-by: Petr Písař <ppisar@redhat.com> diff --git a/img/codec_png.c b/img/codec_png.c index d8f4f39..7b7c307 100644 --- a/img/codec_png.c +++ b/img/codec_png.c @@ -267,7 +267,7 @@ PNGAPI #endif warning_fn( png_structp png_ptr, png_const_charp msg) { - warn( msg); + warn( "%s", msg); } static void -- 2.4.3
fixed, thank you!