diff options
author | Erwan Velu <erwanaliasr1@gmail.com> | 2010-06-22 21:43:27 +0200 |
---|---|---|
committer | Erwan Velu <erwanaliasr1@gmail.com> | 2010-06-22 21:43:27 +0200 |
commit | e7fa1978a0fa326d50bff091b454ecc06aec5330 (patch) | |
tree | 93b9335e71e8a68ac3b226c55c1d71148ba0d384 /com32/menu/menumain.c | |
parent | 3e3afd955d5708c65c33545c7f3094999a7f1395 (diff) | |
download | syslinux-e7fa1978a0fa326d50bff091b454ecc06aec5330.tar.gz |
Replacing strncpy by strlcpy
As reported by hpa, strlcpy is safer and could prevent some bugs.
So I replaced all strncpy by strlcpy calls.
Diffstat (limited to 'com32/menu/menumain.c')
-rw-r--r-- | com32/menu/menumain.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/com32/menu/menumain.c b/com32/menu/menumain.c index b04c70b0..5d85018e 100644 --- a/com32/menu/menumain.c +++ b/com32/menu/menumain.c @@ -446,7 +446,7 @@ static const char *edit_cmdline(const char *input, int top) int key, len, prev_len, cursor; int redraw = 1; /* We enter with the menu already drawn */ - strncpy(cmdline, input, MAX_CMDLINE_LEN); + strlcpy(cmdline, input, MAX_CMDLINE_LEN); cmdline[MAX_CMDLINE_LEN - 1] = '\0'; len = cursor = strlen(cmdline); |