hush/archival/libunarchive/data_extract_to_buffer.c

18 lines
421 B
C
Raw Normal View History

/* vi: set sw=4 ts=4: */
/*
2006-05-29 07:42:02 +00:00
* Copyright 2002 Glenn McGrath
*
2006-05-29 07:42:02 +00:00
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/
2002-10-19 10:40:55 +00:00
#include "libbb.h"
#include "unarchive.h"
2002-10-19 10:40:55 +00:00
void data_extract_to_buffer(archive_handle_t *archive_handle)
2002-10-19 10:40:55 +00:00
{
unsigned int size = archive_handle->file_header->size;
2006-05-29 07:42:02 +00:00
archive_handle->buffer = xzalloc(size + 1);
xread(archive_handle->src_fd, archive_handle->buffer, size);
2002-10-19 10:40:55 +00:00
}