diff --git a/os/mitauth.c b/os/mitauth.c index a268f62f9..eb5ca3998 100644 --- a/os/mitauth.c +++ b/os/mitauth.c @@ -62,7 +62,7 @@ MitAddCookie(unsigned short data_length, const char *data, XID id) } new->next = mit_auth; mit_auth = new; - memmove(new->data, data, (int) data_length); + memcpy(new->data, data, (size_t) data_length); new->len = data_length; new->id = id; return 1; diff --git a/os/rpcauth.c b/os/rpcauth.c index 33260db72..0a752f013 100644 --- a/os/rpcauth.c +++ b/os/rpcauth.c @@ -70,7 +70,7 @@ authdes_ezdecode(const char *inmsg, int len) why = AUTH_FAILED; /* generic error, since there is no AUTH_BADALLOC */ return NULL; } - memmove(temp_inmsg, inmsg, len); + memcpy(temp_inmsg, inmsg, len); memset((char *) &msg, 0, sizeof(msg)); memset((char *) &r, 0, sizeof(r)); diff --git a/os/utils.c b/os/utils.c index c9a8e7367..fe94912f3 100644 --- a/os/utils.c +++ b/os/utils.c @@ -1108,9 +1108,9 @@ set_font_authorizations(char **authorizations, int *authlen, void *client) *p++ = (len) >> 8; *p++ = (len & 0xff); - memmove(p, AUTHORIZATION_NAME, sizeof(AUTHORIZATION_NAME)); + memcpy(p, AUTHORIZATION_NAME, sizeof(AUTHORIZATION_NAME)); p += sizeof(AUTHORIZATION_NAME); - memmove(p, hnameptr, len); + memcpy(p, hnameptr, len); p += len; #if defined(IPv6) && defined(AF_INET6) if (ai) { diff --git a/os/xdmauth.c b/os/xdmauth.c index c35cade5b..ba446e013 100644 --- a/os/xdmauth.c +++ b/os/xdmauth.c @@ -356,8 +356,8 @@ XdmAddCookie(unsigned short data_length, const char *data, XID id) return 0; new->next = xdmAuth; xdmAuth = new; - memmove(new->key.data, key_bits, (int) 8); - memmove(new->rho.data, rho_bits, (int) 8); + memcpy(new->key.data, key_bits, 8); + memcpy(new->rho.data, rho_bits, 8); new->id = id; return 1; } diff --git a/os/xdmcp.c b/os/xdmcp.c index 093e30096..2b7255644 100644 --- a/os/xdmcp.c +++ b/os/xdmcp.c @@ -1409,7 +1409,7 @@ get_addr_by_name(const char *argtype, FatalError("Xserver: %s unknown host: %s\n", argtype, namestr); } if (hep->h_length == sizeof(struct in_addr)) { - memmove(&addr->sin_addr, hep->h_addr, hep->h_length); + memcpy(&addr->sin_addr, hep->h_addr, hep->h_length); *addrlen = sizeof(struct sockaddr_in); addr->sin_family = AF_INET; addr->sin_port = htons(port);