aboutsummaryrefslogtreecommitdiffstats
path: root/com32/menu/menumain.c
diff options
context:
space:
mode:
authorErwan Velu <erwanaliasr1@gmail.com>2010-06-22 21:43:27 +0200
committerErwan Velu <erwanaliasr1@gmail.com>2010-06-22 21:43:27 +0200
commite7fa1978a0fa326d50bff091b454ecc06aec5330 (patch)
tree93b9335e71e8a68ac3b226c55c1d71148ba0d384 /com32/menu/menumain.c
parent3e3afd955d5708c65c33545c7f3094999a7f1395 (diff)
downloadsyslinux-e7fa1978a0fa326d50bff091b454ecc06aec5330.tar.gz
syslinux-e7fa1978a0fa326d50bff091b454ecc06aec5330.tar.xz
syslinux-e7fa1978a0fa326d50bff091b454ecc06aec5330.zip
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.c2
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);