kernel/module.c: use scnprintf() instead of sprintf()
For some strings, they are permitted to be larger than PAGE_SIZE, so need use scnprintf() instead of sprintf(), or it will cause issue. One case is: if a module version is crazy defined (length more than PAGE_SIZE), 'modinfo' command is still OK (print full contents), but for "cat /sys/modules/'modname'/version", will cause issue in kernel. Signed-off-by: NChen Gang <gang.chen@asianux.com> Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
Showing
想要评论请 注册 或 登录