*sizeleft -= count;
set_next_block_after (data_block);
data_block = find_next_block ();
+ if (! data_block)
+ {
+ ERROR ((0, 0, _("Unexpected EOF on archive file")));
+ return;
+ }
}
count = full_write (fd, data_block->buffer, written);
while (1)
{
exhdr = find_next_block ();
+ if (! exhdr)
+ {
+ ERROR ((0, 0, _("Unexpected EOF on archive file")));
+ return;
+ }
for (counter = 0; counter < SPARSES_IN_SPARSE_HEADER; counter++)
{
if (counter + ind > sp_array_size - 1)
xrealloc (sparsearray,
sp_array_size * (sizeof (struct sp_array)));
}
- /* Compare to 0, or use !(int)..., for Pyramid's dumb
- compiler. */
- if (exhdr->sparse_header.sp[counter].numbytes == 0)
+ if (exhdr->sparse_header.sp[counter].numbytes[0] == 0)
break;
sparsearray[counter + ind].offset =
OFF_FROM_CHARS (exhdr->sparse_header.sp[counter].offset);