xkb: Use memcpy for copy that has known length
Fixes warning that strncpy is not able to append NULL to the end of destination. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
de8be07cc0
commit
20cb9c923e
|
@ -534,8 +534,7 @@ XkbAction *act;
|
||||||
|
|
||||||
case XkbSA_XFree86Private:
|
case XkbSA_XFree86Private:
|
||||||
/* copy the kind of action */
|
/* copy the kind of action */
|
||||||
strncpy((char*)act->any.data, (char*)wire.actionData,
|
memcpy(act->any.data, wire.actionData, XkbAnyActionDataSize);
|
||||||
XkbAnyActionDataSize);
|
|
||||||
break ;
|
break ;
|
||||||
|
|
||||||
case XkbSA_Terminate:
|
case XkbSA_Terminate:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user