From: Paul Eggert Date: Sun, 23 Sep 2001 06:18:20 +0000 (+0000) Subject: Allocate one more byte than the size would indicate, since we're X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=e6e72bf7ed8e6226c0d19118c6a92296e83d45c4;p=chaz%2Ftar Allocate one more byte than the size would indicate, since we're null-terminating. --- diff --git a/src/list.c b/src/list.c index 8169a79..425ba7c 100644 --- a/src/list.c +++ b/src/list.c @@ -352,7 +352,7 @@ read_header (bool raw_extended_headers) set_next_block_after (header); if (*longp) free (*longp); - *longp = xmalloc (size); + *longp = xmalloc (size + 1); **longp = *header; bp = (*longp)->buffer + BLOCKSIZE;