]> pd.if.org Git - zpackage/blobdiff - zpm-add.c
add null byte on readlink string
[zpackage] / zpm-add.c
index 8896e800511856af65b30740ccdda540967e9628..3cf7f17f51be829d1462f24b7380d451612ecf3f 100644 (file)
--- a/zpm-add.c
+++ b/zpm-add.c
@@ -199,6 +199,7 @@ int stat_file(struct zpm_file *file, char *path, struct opts *opt) {
                                if (n >= sizeof linkval) {
                                        return 0;
                                }
+                               linkval[n] = 0;
                                file->target = strdup(linkval);
                        }
                }