change strncpy to snprintf, in case PATH_MAX is ridiculously small

This commit is contained in:
Neale Pickett 2013-02-11 12:15:52 -07:00
parent 4b54e2b2f3
commit 4e2e46dfdb
1 changed files with 1 additions and 1 deletions

2
eris.c
View File

@ -939,7 +939,7 @@ handle_request()
char fn[PATH_MAX]; char fn[PATH_MAX];
if (host) { if (host) {
strncpy(fn, host, sizeof fn); snprintf(fn, sizeof(fn), "%s", host);
} else { } else {
fn[0] = 0; fn[0] = 0;
} }