Browse Source

Allocate one more byte than the size would indicate, since we're
null-terminating.

Paul Eggert 23 years ago
parent
commit
e6e72bf7ed
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/list.c

+ 1 - 1
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;