From 471432a9e69cfa6df095089838f779b73e916ed4 Mon Sep 17 00:00:00 2001 From: sin Date: Mon, 10 Feb 2014 19:06:42 +0000 Subject: [PATCH] Ensure opts is null-terminated before calling strcat() --- insmod.c | 1 + 1 file changed, 1 insertion(+) diff --git a/insmod.c b/insmod.c index e175a1c..484c544 100644 --- 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)