[Bug algol68/122330] algol68/compile/error-coercion-2.a68 FAILs with -D_FORTIFY_SOURCE=3

pietro at sociotechnical dot xyz gcc-bugzilla@gcc.gnu.org
Sat Oct 25 02:15:21 GMT 2025


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122330

pietro <pietro at sociotechnical dot xyz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pietro at sociotechnical dot xyz

--- Comment #2 from pietro <pietro at sociotechnical dot xyz> ---
The problem is that we do:
snprintf (TAIL (txt), SNPRINTF_SIZE, whatever)

and when there's something already in the buffer then the leftover capacity in
it is less than SNPRINTF_SIZE. Even though there's enough to fit what we're
adding to the buffer the fortified string functions will abort because we're
telling then we can write more than the buffer size.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Algol68 mailing list