Use memmove instead of memcpy where there is overlap (modunload).

This commit is contained in:
Jilles Tjoelker 2010-03-05 22:05:15 +01:00
parent 65b8e0029e
commit a4893a45be
1 changed files with 1 additions and 1 deletions

View File

@ -881,7 +881,7 @@ unload_one_module(const char *name, int warn)
dlclose(modlist[modindex]->address);
rb_free(modlist[modindex]->name);
memcpy(&modlist[modindex], &modlist[modindex + 1],
memmove(&modlist[modindex], &modlist[modindex + 1],
sizeof(struct module) * ((num_mods - 1) - modindex));
if(num_mods != 0)