From 2fe9fbe777c91717d0ea18d6863db42bfc2d7b59 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 5 Oct 2014 08:09:42 +0200 Subject: [PATCH] bin/xbps-create/main.c: Out-of-bounds write (CID 62686) --- bin/xbps-create/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/xbps-create/main.c b/bin/xbps-create/main.c index f9980d80..9ca48228 100644 --- a/bin/xbps-create/main.c +++ b/bin/xbps-create/main.c @@ -497,7 +497,7 @@ process_entry_file(struct archive *ar, if (len < 0 || len > st.st_size) die("failed to add entry %s (readlink) to archive:", xe->file); - buf[len] = '\0'; + buf[len-1] = '\0'; archive_entry_set_symlink(entry, buf); } free(p);