From: Nathan Wagner Date: Thu, 13 Dec 2018 19:28:04 +0000 (+0000) Subject: add null byte on readlink string X-Git-Tag: v0.5.0~43 X-Git-Url: https://pd.if.org/git/?p=zpackage;a=commitdiff_plain;h=8b1e91714de0575adeb202668d7983b7f987afc0 add null byte on readlink string --- 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); } }