bug-gnu-chess
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: issue saving a game


From: simon
Subject: Re: issue saving a game
Date: Sat, 10 Oct 2020 09:02:32 +0100

This seems to be FORTIFY_SOURCE compiler flag. Debian sets level 2, but just level 1 triggers it.

The code uses sprintf to concatenate strings which is "undefined" behaviour, the offending code is flagged by enabling all compiler warnings when building pgn.cc

This explains why it wasn't caught in development. I've sent patch to Antonio which fixes it, but he should probably be skeptical as I've not done C/C++ for years, and haven't fixed related warning elsewhere. If we are using C++ we should probably consider using C++ output features, and definitely enabling all warnings and including FORTIFY_SOURCE level 2 as this is how the distros roll.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]