mirror of
https://github.com/sheumann/hush.git
synced 2024-12-22 14:30:31 +00:00
Terminate the buffer with a '\0'
This commit is contained in:
parent
0288c8e543
commit
ea12202288
@ -19,8 +19,10 @@
|
|||||||
|
|
||||||
extern void data_extract_to_buffer(archive_handle_t *archive_handle)
|
extern void data_extract_to_buffer(archive_handle_t *archive_handle)
|
||||||
{
|
{
|
||||||
archive_handle->buffer = xmalloc(archive_handle->file_header->size + 1);
|
const unsigned int size = archive_handle->file_header->size;
|
||||||
|
|
||||||
archive_xread_all(archive_handle, archive_handle->buffer, archive_handle->file_header->size);
|
|
||||||
|
|
||||||
|
archive_handle->buffer = xmalloc(size + 1);
|
||||||
|
|
||||||
|
archive_xread_all(archive_handle, archive_handle->buffer, size);
|
||||||
|
archive_handle->buffer[size] = '\0';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user