Replace calls to sprintf() with strlcpy() in settings.c.
sprintf() was being used to copy a string constant with no formatting verbs; just use strlcpy() instead. Signed-off-by: Dan Cross <patchdev@fat-dragon.org>
This commit is contained in:
parent
588242f68e
commit
f1361379af
@ -26,13 +26,13 @@ void settings_menu(struct user_record *user) {
|
|||||||
s_printf(get_string(221), (user->codepage ? "UTF-8" : "CP437"));
|
s_printf(get_string(221), (user->codepage ? "UTF-8" : "CP437"));
|
||||||
switch (user->exteditor) {
|
switch (user->exteditor) {
|
||||||
case 0:
|
case 0:
|
||||||
sprintf(buffer, "NO");
|
strlcpy(buffer, "NO", sizeof buffer);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
sprintf(buffer, "YES");
|
strlcpy(buffer, "YES", sizeof buffer);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
sprintf(buffer, "ASK");
|
strlcpy(buffer, "ASK", sizeof buffer);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
s_printf(get_string(222), buffer);
|
s_printf(get_string(222), buffer);
|
||||||
|
Reference in New Issue
Block a user