[Mesa-dev] [PATCH] intel: tools: Fix aubinator_error's fprintf call (format-security)
Kai Wasserbäch
kai at dev.carbon-project.org
Sat Aug 25 16:35:21 UTC 2018
Hey Lionel,
Lionel Landwerlin wrote on 8/25/18 5:50 PM:
> On 25/08/2018 11:00, Kai Wasserbäch wrote:
>> The recent commit 4616639b49b4bbc91e503c1c27632dccc1c2b5be introduced
>> the new function aubinator_error() which is a trivial wrapper around
>> fprintf() to STDERR. The call to fprintf() however is passed the message
>> msg directly:
>> fprintf(stderr, msg);
>>
>> This is a format-security violation and leads to an FTBFS with
>> -Werror=format-security (GCC 8):
>> ../../../src/intel/tools/aubinator.c: In function 'aubinator_error':
>> ../../../src/intel/tools/aubinator.c:74:4: error: format not a string
>> literal and no format arguments [-Werror=format-security]
>> fprintf(stderr, msg);
>> ^~~~~~~
>>
>> This patch fixes this trivially by introducing a catch-all "%s" format
>> argument.
>>
>> Fixes: 4616639b49b ("intel: tools: split aub parsing from aubinator")
>> Cc: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
>> Signed-off-by: Kai Wasserbäch <kai at dev.carbon-project.org>
>
>
> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
thank you for the review and pushing the patch for me!
Cheers,
Kai
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180825/7ae93886/attachment.sig>
More information about the mesa-dev
mailing list