[PATCH 01/15] xkb: Use memcpy for copy that has known length
Pauli Nieminen
ext-pauli.nieminen at nokia.com
Tue Jul 27 05:09:42 PDT 2010
Fixes warning that strncpy is not able to append NULL to the end
of destination.
Signed-off-by: Pauli Nieminen <ext-pauli.nieminen at nokia.com>
---
xkb/xkmread.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/xkb/xkmread.c b/xkb/xkmread.c
index 814bb1d..9eb8601 100644
--- a/xkb/xkmread.c
+++ b/xkb/xkmread.c
@@ -534,8 +534,7 @@ XkbAction *act;
case XkbSA_XFree86Private:
/* copy the kind of action */
- strncpy((char*)act->any.data, (char*)wire.actionData,
- XkbAnyActionDataSize);
+ memcpy(act->any.data, wire.actionData, XkbAnyActionDataSize);
break ;
case XkbSA_Terminate:
--
1.6.3.3
More information about the xorg-devel
mailing list