From 8b1e91714de0575adeb202668d7983b7f987afc0 Mon Sep 17 00:00:00 2001 From: Nathan Wagner Date: Thu, 13 Dec 2018 19:28:04 +0000 Subject: [PATCH] add null byte on readlink string --- zpm-add.c | 1 + 1 file changed, 1 insertion(+) diff --git a/zpm-add.c b/zpm-add.c index 8896e80..3cf7f17 100644 --- 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); } } -- 2.40.0