projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c9a3ba5
)
module: Fix gratuitous sprintf in module.c
author
Rusty Russell
<rusty@rustcorp.com.au>
Tue, 29 Jan 2008 22:13:20 +0000
(17:13 -0500)
committer
Rusty Russell
<rusty@rustcorp.com.au>
Tue, 29 Jan 2008 06:13:21 +0000
(17:13 +1100)
Andrew sent an older version of this patch: we shouldn't use sprintf
to copy a string.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
kernel/module.c
patch
|
blob
|
blame
|
history
diff --git
a/kernel/module.c
b/kernel/module.c
index 17314691d3ccb93fe96542e67f44ac144de9ec48..276abd7b7ff7cd5f978dffc91ae9f598b7d1ad4d 100644
(file)
--- a/
kernel/module.c
+++ b/
kernel/module.c
@@
-738,7
+738,7
@@
sys_delete_module(const char __user *name_user, unsigned int flags)
mutex_lock(&module_mutex);
}
/* Store the name of the last unloaded module for diagnostic purposes */
- s
printf(last_unloaded_module, mod->name
);
+ s
trlcpy(last_unloaded_module, mod->name, sizeof(last_unloaded_module)
);
free_module(mod);
out: