summaryrefslogtreecommitdiffstats
path: root/perform/sio_engine.c
diff options
context:
space:
mode:
Diffstat (limited to 'perform/sio_engine.c')
-rw-r--r--perform/sio_engine.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/perform/sio_engine.c b/perform/sio_engine.c
index 8539f75..4ce3aa0 100644
--- a/perform/sio_engine.c
+++ b/perform/sio_engine.c
@@ -371,7 +371,8 @@ sio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si
fullname[i] = subdir[j];
} else {
/* We didn't append the prefix yet */
- HDstrncpy(fullname, prefix, MIN(HDstrlen(prefix), size));
+ HDstrncpy(fullname, prefix, size);
+ fullname[size - 1] = '\0';
}
if ((HDstrlen(fullname) + HDstrlen(base_name) + 1) < size) {