From 4e2e46dfdb6a2ccd62e9f954f94495054e4e4d9c Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Mon, 11 Feb 2013 12:15:52 -0700 Subject: [PATCH] change strncpy to snprintf, in case PATH_MAX is ridiculously small --- eris.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eris.c b/eris.c index 597190a..da99dc5 100644 --- a/eris.c +++ b/eris.c @@ -939,7 +939,7 @@ handle_request() char fn[PATH_MAX]; if (host) { - strncpy(fn, host, sizeof fn); + snprintf(fn, sizeof(fn), "%s", host); } else { fn[0] = 0; }