Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit efa5345e authored by Rusty Russell's avatar Rusty Russell
Browse files

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: default avatarRusty Russell <rusty@rustcorp.com.au>
parent c9a3ba55
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 */
	sprintf(last_unloaded_module, mod->name);
	strlcpy(last_unloaded_module, mod->name, sizeof(last_unloaded_module));
	free_module(mod);

 out: