bin/xbps-create/main.c: Out-of-bounds write (CID 62686)

This commit is contained in:
Juan RP 2014-10-05 08:09:42 +02:00
parent ced1ce4b40
commit 2fe9fbe777

View File

@ -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);