mirror of
https://github.com/AuxXxilium/kmod.git
synced 2024-11-24 07:20:52 +07:00
Fix wrong name len when converting path to modname
This commit is contained in:
parent
b6ea28dda4
commit
9dec24462d
@ -366,7 +366,7 @@ KMOD_EXPORT int kmod_module_new_from_path(struct kmod_ctx *ctx,
|
||||
|
||||
m->ctx = kmod_ref(ctx);
|
||||
m->name = (char *)m + sizeof(*m);
|
||||
memcpy(m->name, name, namelen);
|
||||
memcpy(m->name, name, namelen + 1);
|
||||
m->path = abspath;
|
||||
m->hashkey = m->name;
|
||||
m->refcount = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user