I think the issue is the tempfont variable being too short, as strlen returns the length of the string excluding the terminating 0. This means that strcpy tries to perform an out of bounds write, but FORTIFY_SOURCE prevents it from doing so. So I think the fix could be
Since openSUSE introduced
-D_FORTIFY_SOURCE=3
as a global cflag, pluma keeps crashing on pressing shortcuts with ctrl key, eg. CTRL + SExpected behaviour
no crash
Actual behaviour
buffer overflow detected : terminated Aborted (core dumped)
Steps to reproduce the behaviour
MATE general version
1.26
Package version
1.26.0
Linux Distribution
openSUSE Tumbleweed
Link to bugreport of your Distribution (requirement)
https://bugzilla.opensuse.org/show_bug.cgi?id=1200853
I traced down the issue to this
strcpy
callhttps://github.com/mate-desktop/pluma/blob/v1.26.0/pluma/pluma-window.c#L322
I think the issue is the
tempfont
variable being too short, asstrlen
returns the length of the string excluding the terminating 0. This means thatstrcpy
tries to perform an out of bounds write, but FORTIFY_SOURCE prevents it from doing so. So I think the fix could bebut I need someone to confirm this.