Message ID | mailman.23141.1550818672.2376.openwrt-devel@lists.openwrt.org |
---|---|
State | Accepted |
Delegated to: | Hauke Mehrtens |
Headers | show |
Series | [OpenWrt-Devel,v2,ubox] kmodloader: increase module name length | expand |
diff --git a/kmodloader.c b/kmodloader.c index 3196deb..2e920ef 100644 --- a/kmodloader.c +++ b/kmodloader.c @@ -37,6 +37,8 @@ #include <libubox/ulog.h> #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);