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:
@@ -8283,8 +8283,8 @@ option_help()
|
||||
|| (is_wc2_option(optname) && !wc2_supported(optname)))
|
||||
continue;
|
||||
Sprintf(buf2, "`%s'", optname);
|
||||
Sprintf(buf, "%-20s - %s%c", buf2, allopt[i].descr,
|
||||
allopt[i + 1].name ? ',' : '.');
|
||||
Snprintf(buf, sizeof(buf), "%-20s - %s%c", buf2, allopt[i].descr,
|
||||
allopt[i + 1].name ? ',' : '.');
|
||||
putstr(datawin, 0, buf);
|
||||
}
|
||||
putstr(datawin, 0, "");
|
||||
|
||||
Reference in New Issue
Block a user