From e5b9802c82abd04d511eef0da8c74df2facfcd79 Mon Sep 17 00:00:00 2001 From: chris mikkelson Date: Fri, 27 Mar 2009 16:07:48 -0500 Subject: [PATCH] null-terminate filename after strncpy(). --- module.c | 1 + 1 file changed, 1 insertion(+) diff --git a/module.c b/module.c index d7d3b1b..566f2fa 100644 --- a/module.c +++ b/module.c @@ -31,6 +31,7 @@ module_init(char *modulespec) if (t-modulespec - 1 > sizeof(modpath)) errx(1, "module path too long: %s\n", modulespec); strncpy(modpath, modulespec, t - modulespec); + modpath[t-modulespec] = 0; file = modpath; t++; } -- 2.50.1