diff options
Diffstat (limited to 'perform/pio_engine.c')
-rw-r--r-- | perform/pio_engine.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/perform/pio_engine.c b/perform/pio_engine.c index 87fa82c..d34fe38 100644 --- a/perform/pio_engine.c +++ b/perform/pio_engine.c @@ -464,7 +464,8 @@ pio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si } 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) { |