From: chris mikkelson Date: Fri, 27 Mar 2009 21:07:48 +0000 (-0500) Subject: null-terminate filename after strncpy(). X-Git-Url: https://git.mikk.net/?a=commitdiff_plain;h=e5b9802c82abd04d511eef0da8c74df2facfcd79;p=smtpsink null-terminate filename after strncpy(). --- 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++; }