busybox/archival/libunarchive/data_extract_to_buffer.c

18 lines
431 B
C
Raw Normal View History

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