Commit 622d35ed authored by Hilko Bengen's avatar Hilko Bengen

Add upstream fix for FTBFS on some architectures (Closes: #852373)

parent 0b2bd46a
From: Joachim Metz <joachim.metz@gmail.com>
Date: Wed, 25 Jan 2017 07:05:08 +0100
Subject: Added bounds check to data segment
---
libesedb/libesedb_data_segment.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/libesedb/libesedb_data_segment.c b/libesedb/libesedb_data_segment.c
index cf1ecf1..931bc77 100644
--- a/libesedb/libesedb_data_segment.c
+++ b/libesedb/libesedb_data_segment.c
@@ -64,6 +64,17 @@ int libesedb_data_segment_initialize(
return( -1 );
}
+ if( data_size > (size_t) SSIZE_MAX )
+ {
+ libcerror_error_set(
+ error,
+ LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
+ LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
+ "%s: invalid data size value exceeds maximum.",
+ function );
+
+ return( -1 );
+ }
*data_segment = memory_allocate_structure(
libesedb_data_segment_t );
0001-Add-missing-file-from-upstream-git.patch 0001-Add-missing-file-from-upstream-git.patch
0002-Added-bounds-check-to-data-segment.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment