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

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

bug#38794: 26.1; Warnings in w32 build


From: Eli Zaretskii
Subject: bug#38794: 26.1; Warnings in w32 build
Date: Sun, 29 Dec 2019 19:20:32 +0200

tags 38794 wontfix
close 38794
thanks

> From: Cecilio Pardo <cpardo@imayhem.com>
> Date: Sun, 29 Dec 2019 17:04:41 +0100
> 
> I am getting some warnings building with mingw64, using gcc 9.2.0. It
> complies about possible buffer overruns with sprintf. Maybe upgrade to 
> snprintf?
> 
> This is the warnings message:
> 
> addpm.c: In function 'main':
> addpm.c:291:37: warning: '\bin\' directive writing 5 bytes into a region of 
> size between 2 and 261 [-Wformat-overflow=]
>   291 |        sprintf (full_emacs_path, "%s\\bin\\%s", emacs_path, 
> prog_name);
>       |                                     ^~~~~~~
> addpm.c:291:8: note: 'sprintf' output between 18 and 277 bytes into a 
> destination of size 261
>   291 |        sprintf (full_emacs_path, "%s\\bin\\%s", emacs_path, 
> prog_name);
>       |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

They are bogus, obviously, and we would like to deprecate and remove
addpm at some future point.  So I see no reason to make it compile
cleanly with GCC's too radical warning options.

So I'm closing this bug report.

Thank you anyway for your interest in Emacs and for providing a patch.





reply via email to

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