]> pd.if.org Git - zpackage/commitdiff
add null byte on readlink string
authorNathan Wagner <nw@hydaspes.if.org>
Thu, 13 Dec 2018 19:28:04 +0000 (19:28 +0000)
committerNathan Wagner <nw@hydaspes.if.org>
Thu, 13 Dec 2018 19:28:04 +0000 (19:28 +0000)
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);
                        }
                }