commit 471432a9e69cfa6df095089838f779b73e916ed4 parent deeeec8977e7c193e081c38162ee4448cc9b314d Author: sin <sin@2f30.org> Date: Mon, 10 Feb 2014 19:06:42 +0000 Ensure opts is null-terminated before calling strcat() Diffstat:
M | insmod.c | | | 1 | + |
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/insmod.c b/insmod.c @@ -54,6 +54,7 @@ main(int argc, char *argv[]) opts = malloc(plen); if (!opts) eprintf("malloc:"); + memset(opts, 0, plen); for (i = 0; i < argc; i++) { strcat(opts, argv[i]); if (i + 1 < argc)