Commit:     efa5345e39d01deef349c120f55ac6b6eabe7457
Parent:     c9a3ba55bb5da03fc7d707709a7fe078fe1aa0a0
Author:     Rusty Russell <[EMAIL PROTECTED]>
AuthorDate: Tue Jan 29 17:13:20 2008 -0500
Committer:  Rusty Russell <[EMAIL PROTECTED]>
CommitDate: Tue Jan 29 17:13:21 2008 +1100

    module: Fix gratuitous sprintf in module.c
    Andrew sent an older version of this patch: we shouldn't use sprintf
    to copy a string.
    Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
 kernel/module.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/module.c b/kernel/module.c
index 1731469..276abd7 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -738,7 +738,7 @@ sys_delete_module(const char __user *name_user, unsigned 
int flags)
        /* Store the name of the last unloaded module for diagnostic purposes */
-       sprintf(last_unloaded_module, mod->name);
+       strlcpy(last_unloaded_module, mod->name, sizeof(last_unloaded_module));
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to