On 1. 6. 2026 22:55, Sean McBride wrote:
On 1 Jun 2026, at 16:46, Branko Čibej wrote:

I prefer to just silence the brain-dead warning...
The warning is hardly brain-dead. sprintf() cannot be implemented safely as it 
has no idea how big the buffer is. Memory overruns are an infamous problem in 
C, and using sprintf() in 2026 is madness IMNSHO.

Your opinion is noted. Whether or not sprintf() can be implemented safely is not the issue. It can be and is used safely in this instance.

OpenBSD has this same warning as macOS BTW.

Why not deprecate all of pre-C99 <string.h> while we're at it? Pretty much all of it is impossible to implement safely.

-- Brane

Reply via email to