Use memmove instead of memcpy where there is overlap (modunload).
This commit is contained in:
parent
65b8e0029e
commit
a4893a45be
|
@ -881,7 +881,7 @@ unload_one_module(const char *name, int warn)
|
||||||
dlclose(modlist[modindex]->address);
|
dlclose(modlist[modindex]->address);
|
||||||
|
|
||||||
rb_free(modlist[modindex]->name);
|
rb_free(modlist[modindex]->name);
|
||||||
memcpy(&modlist[modindex], &modlist[modindex + 1],
|
memmove(&modlist[modindex], &modlist[modindex + 1],
|
||||||
sizeof(struct module) * ((num_mods - 1) - modindex));
|
sizeof(struct module) * ((num_mods - 1) - modindex));
|
||||||
|
|
||||||
if(num_mods != 0)
|
if(num_mods != 0)
|
||||||
|
|
Loading…
Reference in New Issue