Fix gcc sprintf warnings
Gcc 9 has become more vocal with sprintf buffer overflow checking. Remove these sprintf warnings by changing the offending calls to a snprintf wrapper that will explicitly check the result.
This commit is contained in:
@@ -205,7 +205,8 @@ const char *goal;
|
||||
} else {
|
||||
Sprintf(kbuf, "'%s'", visctrl(g.Cmd.spkeys[NHKF_GETPOS_PICK]));
|
||||
}
|
||||
Sprintf(sbuf, "Type a %s when you are at the right place.", kbuf);
|
||||
Snprintf(sbuf, sizeof(sbuf),
|
||||
"Type a %s when you are at the right place.", kbuf);
|
||||
putstr(tmpwin, 0, sbuf);
|
||||
if (doing_what_is) {
|
||||
Sprintf(sbuf,
|
||||
|
||||
Reference in New Issue
Block a user