busybox/archival/libunarchive/data_extract_to_buffer.c

18 lines
407 B
C
Raw Normal View History

/*
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 data_extract_to_buffer(archive_handle_t *archive_handle)
2002-10-19 16:10:55 +05:30
{
2002-11-07 04:01:45 +05:30
const unsigned int size = archive_handle->file_header->size;
2006-05-29 13:12:02 +05:30
archive_handle->buffer = xzalloc(size + 1);
2002-11-07 04:01:45 +05:30
archive_xread_all(archive_handle, archive_handle->buffer, size);
2002-10-19 16:10:55 +05:30
}