Skip to content

Commit

Permalink
fix: initialize zero buffer for uninitialized mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
secDre4mer committed Nov 13, 2023
1 parent c434efa commit 69b3b02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libyara/proc/linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ YR_API const uint8_t* yr_process_fetch_memory_block_data(YR_MEMORY_BLOCK* block)
context->buffer_size = block->size;
}

if (fd == -1)
if (fd < 0)
{
context->buffer = mmap(
NULL,
Expand Down

0 comments on commit 69b3b02

Please sign in to comment.