From: Sergiy Kibrik Date: Fri, 22 Feb 2019 06:57:52 +0000 (+0000) Subject: kmodloader: increase module name length X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a782779552a0d68e3bb588e3039eb95da15ec7b0;p=oweals%2Fubox.git kmodloader: increase module name length Otherwise modules with long names, e.g. lttng (>32 chars) can't be loaded. Signed-off-by: Sergiy Kibrik --- diff --git a/kmodloader.c b/kmodloader.c index 3196deb..2e920ef 100644 --- a/kmodloader.c +++ b/kmodloader.c @@ -37,6 +37,8 @@ #include #define DEF_MOD_PATH "/modules/%s/" +/* duplicated from in-kernel include/linux/module.h */ +#define MODULE_NAME_LEN (64 - sizeof(unsigned long)) enum { SCANNED, @@ -157,7 +159,7 @@ static char* get_module_path(char *name) static char* get_module_name(char *path) { - static char name[33]; + static char name[MODULE_NAME_LEN]; char *t; strncpy(name, basename(path), sizeof(name) - 1);