aboutsummaryrefslogtreecommitdiffstats
path: root/com32/gpllib/memory.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/gpllib/memory.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/gpllib/memory.c')
-rw-r--r--com32/gpllib/memory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/com32/gpllib/memory.c b/com32/gpllib/memory.c
index d98de030..28a95ff4 100644
--- a/com32/gpllib/memory.c
+++ b/com32/gpllib/memory.c
@@ -44,7 +44,7 @@ void get_type(int type, char *type_ptr, int type_ptr_sz)
{
unsigned int real_type = type - 1;
if (real_type < sizeof(e820_types) / sizeof(e820_types[0]))
- strncpy(type_ptr, e820_types[real_type], type_ptr_sz);
+ strlcpy(type_ptr, e820_types[real_type], type_ptr_sz);
}
/**