diff options
Diffstat (limited to 'src/package.c')
-rw-r--r-- | src/package.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/package.c b/src/package.c index 1fc9a07..89d16cb 100644 --- a/src/package.c +++ b/src/package.c @@ -653,6 +653,8 @@ int package_save(struct package *p, const char *fn) { goto finish; } + hn[sizeof(hn)-1] = 0; + snprintf(path, sizeof(path), "%s.%s.%u", fn, hn, getpid()); if ((p->write_fd = open(path, O_RDWR|O_TRUNC|O_CREAT, 0666)) < 0) { /* RDWR for mmap compatibility */ |