]> Dogcows Code - chaz/tar/commitdiff
Allocate one more byte than the size would indicate, since we're
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 23 Sep 2001 06:18:20 +0000 (06:18 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 23 Sep 2001 06:18:20 +0000 (06:18 +0000)
null-terminating.

src/list.c

index 8169a7968704294d4aafeefeb746cfcd244b1f1e..425ba7cb45bec3695c2497b1d2a2319ca2191480 100644 (file)
@@ -352,7 +352,7 @@ read_header (bool raw_extended_headers)
          set_next_block_after (header);
          if (*longp)
            free (*longp);
          set_next_block_after (header);
          if (*longp)
            free (*longp);
-         *longp = xmalloc (size);
+         *longp = xmalloc (size + 1);
          **longp = *header;
          bp = (*longp)->buffer + BLOCKSIZE;
 
          **longp = *header;
          bp = (*longp)->buffer + BLOCKSIZE;
 
This page took 0.0258 seconds and 4 git commands to generate.