Commit b4a86f43 authored by Cristian Greco's avatar Cristian Greco

Imported Upstream version 20091224

parent aa13d610
...@@ -202,6 +202,10 @@ Beta after next stable release ...@@ -202,6 +202,10 @@ Beta after next stable release
* check into resume write error for 32-bit compile * check into resume write error for 32-bit compile
* check make distclean * check make distclean
20091224
* correction of return value of several ree functions
* applied multi header patch
20091114 20091114
* moved codepage definitions to libewf_codepage.h * moved codepage definitions to libewf_codepage.h
* updated libbfio * updated libbfio
......
...@@ -423,13 +423,13 @@ ...@@ -423,13 +423,13 @@
#define PACKAGE_NAME "libewf" #define PACKAGE_NAME "libewf"
/* Define to the full name and version of this package. */ /* Define to the full name and version of this package. */
#define PACKAGE_STRING "libewf 20091128" #define PACKAGE_STRING "libewf 20091224"
/* Define to the one symbol short name of this package. */ /* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "libewf" #define PACKAGE_TARNAME "libewf"
/* Define to the version of this package. */ /* Define to the version of this package. */
#define PACKAGE_VERSION "20091128" #define PACKAGE_VERSION "20091224"
/* The size of `off_t', as computed by sizeof. */ /* The size of `off_t', as computed by sizeof. */
#define SIZEOF_OFF_T 8 #define SIZEOF_OFF_T 8
...@@ -453,7 +453,7 @@ ...@@ -453,7 +453,7 @@
/* #undef TM_IN_SYS_TIME */ /* #undef TM_IN_SYS_TIME */
/* Version number of package */ /* Version number of package */
#define VERSION "20091128" #define VERSION "20091224"
/* Number of bits in a file offset, on hosts where this is settable. */ /* Number of bits in a file offset, on hosts where this is settable. */
/* #undef _FILE_OFFSET_BITS */ /* #undef _FILE_OFFSET_BITS */
......
#! /bin/sh #! /bin/sh
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.63 for libewf 20091128. # Generated by GNU Autoconf 2.63 for libewf 20091224.
# #
# Report bugs to <forensics@hoffmannbv.nl>. # Report bugs to <forensics@hoffmannbv.nl>.
# #
...@@ -745,8 +745,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} ...@@ -745,8 +745,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package. # Identity of this package.
PACKAGE_NAME='libewf' PACKAGE_NAME='libewf'
PACKAGE_TARNAME='libewf' PACKAGE_TARNAME='libewf'
PACKAGE_VERSION='20091128' PACKAGE_VERSION='20091224'
PACKAGE_STRING='libewf 20091128' PACKAGE_STRING='libewf 20091224'
PACKAGE_BUGREPORT='forensics@hoffmannbv.nl' PACKAGE_BUGREPORT='forensics@hoffmannbv.nl'
ac_unique_file="include/libewf.h.in" ac_unique_file="include/libewf.h.in"
...@@ -1537,7 +1537,7 @@ if test "$ac_init_help" = "long"; then ...@@ -1537,7 +1537,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing. # Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh. # This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF cat <<_ACEOF
\`configure' configures libewf 20091128 to adapt to many kinds of systems. \`configure' configures libewf 20091224 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]... Usage: $0 [OPTION]... [VAR=VALUE]...
...@@ -1607,7 +1607,7 @@ fi ...@@ -1607,7 +1607,7 @@ fi
if test -n "$ac_init_help"; then if test -n "$ac_init_help"; then
case $ac_init_help in case $ac_init_help in
short | recursive ) echo "Configuration of libewf 20091128:";; short | recursive ) echo "Configuration of libewf 20091224:";;
esac esac
cat <<\_ACEOF cat <<\_ACEOF
...@@ -1721,7 +1721,7 @@ fi ...@@ -1721,7 +1721,7 @@ fi
test -n "$ac_init_help" && exit $ac_status test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then if $ac_init_version; then
cat <<\_ACEOF cat <<\_ACEOF
libewf configure 20091128 libewf configure 20091224
generated by GNU Autoconf 2.63 generated by GNU Autoconf 2.63
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
...@@ -1735,7 +1735,7 @@ cat >config.log <<_ACEOF ...@@ -1735,7 +1735,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. running configure, to aid debugging if configure makes a mistake.
It was created by libewf $as_me 20091128, which was It was created by libewf $as_me 20091224, which was
generated by GNU Autoconf 2.63. Invocation command line was generated by GNU Autoconf 2.63. Invocation command line was
$ $0 $@ $ $0 $@
...@@ -2587,7 +2587,7 @@ fi ...@@ -2587,7 +2587,7 @@ fi
# Define the identity of the package. # Define the identity of the package.
PACKAGE=libewf PACKAGE=libewf
VERSION=20091128 VERSION=20091224
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
...@@ -38114,7 +38114,7 @@ exec 6>&1 ...@@ -38114,7 +38114,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their # report actual input values of CONFIG_FILES etc. instead of their
# values after options handling. # values after options handling.
ac_log=" ac_log="
This file was extended by libewf $as_me 20091128, which was This file was extended by libewf $as_me 20091224, which was
generated by GNU Autoconf 2.63. Invocation command line was generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES CONFIG_FILES = $CONFIG_FILES
...@@ -38177,7 +38177,7 @@ Report bugs to <bug-autoconf@gnu.org>." ...@@ -38177,7 +38177,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\ ac_cs_version="\\
libewf config.status 20091128 libewf config.status 20091224
configured by $0, generated by GNU Autoconf 2.63, configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
...@@ -2,7 +2,7 @@ AC_PREREQ( 2.59 ) ...@@ -2,7 +2,7 @@ AC_PREREQ( 2.59 )
AC_INIT( AC_INIT(
[libewf], [libewf],
[20091128], [20091224],
[forensics@hoffmannbv.nl]) [forensics@hoffmannbv.nl])
AC_CONFIG_SRCDIR( AC_CONFIG_SRCDIR(
...@@ -10,7 +10,7 @@ AC_CONFIG_SRCDIR( ...@@ -10,7 +10,7 @@ AC_CONFIG_SRCDIR(
AM_INIT_AUTOMAKE( AM_INIT_AUTOMAKE(
[libewf], [libewf],
[20091128]) [20091224])
AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_MACRO_DIR([m4])
......
...@@ -25,11 +25,11 @@ ...@@ -25,11 +25,11 @@
#include <libewf/types.h> #include <libewf/types.h>
#define LIBEWF_VERSION 20091128 #define LIBEWF_VERSION 20091224
/* The libewf version string /* The libewf version string
*/ */
#define LIBEWF_VERSION_STRING "20091128" #define LIBEWF_VERSION_STRING "20091224"
/* The libewf file access /* The libewf file access
* bit 1 set to 1 for read access * bit 1 set to 1 for read access
......
...@@ -5,7 +5,7 @@ includedir=${prefix}/include ...@@ -5,7 +5,7 @@ includedir=${prefix}/include
Name: libewf Name: libewf
Description: Library to support the Expert Witness Compression Format (EWF) Description: Library to support the Expert Witness Compression Format (EWF)
Version: 20091128 Version: 20091224
Libs: -L${libdir} -lewf Libs: -L${libdir} -lewf
Libs.private: -lz Libs.private: -lz
Cflags: -I${includedir} Cflags: -I${includedir}
......
Name: libewf Name: libewf
Version: 20091128 Version: 20091224
Release: 1 Release: 1
Summary: Library to support the Expert Witness Compression Format Summary: Library to support the Expert Witness Compression Format
Group: System Environment/Libraries Group: System Environment/Libraries
......
...@@ -37,11 +37,11 @@ ...@@ -37,11 +37,11 @@
#include <libewf/definitions.h> #include <libewf/definitions.h>
#else #else
#define LIBEWF_VERSION 20091128 #define LIBEWF_VERSION 20091224
/* The libewf version string /* The libewf version string
*/ */
#define LIBEWF_VERSION_STRING "20091128" #define LIBEWF_VERSION_STRING "20091224"
/* The libewf file access /* The libewf file access
* bit 1 set to 1 for read access * bit 1 set to 1 for read access
......
...@@ -597,7 +597,7 @@ int libewf_handle_free( ...@@ -597,7 +597,7 @@ int libewf_handle_free(
*handle = NULL; *handle = NULL;
} }
return( 1 ); return( result );
} }
/* Signals the libewf handle to abort its current activity /* Signals the libewf handle to abort its current activity
......
...@@ -102,6 +102,7 @@ int libewf_io_handle_free( ...@@ -102,6 +102,7 @@ int libewf_io_handle_free(
liberror_error_t **error ) liberror_error_t **error )
{ {
static char *function = "libewf_io_handle_free"; static char *function = "libewf_io_handle_free";
int result = 1;
if( io_handle == NULL ) if( io_handle == NULL )
{ {
...@@ -128,12 +129,14 @@ int libewf_io_handle_free( ...@@ -128,12 +129,14 @@ int libewf_io_handle_free(
LIBERROR_RUNTIME_ERROR_FINALIZE_FAILED, LIBERROR_RUNTIME_ERROR_FINALIZE_FAILED,
"%s: unable to free file io pool.", "%s: unable to free file io pool.",
function ); function );
result = -1;
} }
memory_free( memory_free(
*io_handle ); *io_handle );
*io_handle = NULL; *io_handle = NULL;
} }
return( 1 ); return( result );
} }
...@@ -2741,11 +2741,14 @@ int libewf_get_amount_of_header_values( ...@@ -2741,11 +2741,14 @@ int libewf_get_amount_of_header_values(
{ {
liberror_error_t *error = NULL; liberror_error_t *error = NULL;
static char *function = "libewf_get_amount_of_header_values"; static char *function = "libewf_get_amount_of_header_values";
int result = 0;
if( libewf_handle_get_amount_of_header_values( result = libewf_handle_get_amount_of_header_values(
handle, handle,
amount_of_values, amount_of_values,
&error ) != 1 ) &error );
if( result == -1 )
{ {
liberror_error_set( liberror_error_set(
&error, &error,
...@@ -2761,7 +2764,7 @@ int libewf_get_amount_of_header_values( ...@@ -2761,7 +2764,7 @@ int libewf_get_amount_of_header_values(
return( -1 ); return( -1 );
} }
return( 1 ); return( result );
} }
/* Retrieves the header value identifier size specified by its index /* Retrieves the header value identifier size specified by its index
......
...@@ -3313,7 +3313,9 @@ int libewf_handle_parse_header_values( ...@@ -3313,7 +3313,9 @@ int libewf_handle_parse_header_values(
liberror_error_t **error ) liberror_error_t **error )
{ {
static char *function = "libewf_handle_parse_header_values"; static char *function = "libewf_handle_parse_header_values";
int result = 1; int result_header = 1;
int result_header2 = 1;
int result_xheader = 1;
if( internal_handle == NULL ) if( internal_handle == NULL )
{ {
...@@ -3387,7 +3389,7 @@ int libewf_handle_parse_header_values( ...@@ -3387,7 +3389,7 @@ int libewf_handle_parse_header_values(
"%s: unable to parse header.", "%s: unable to parse header.",
function ); function );
result = -1; result_header = -1;
} }
if( ( internal_handle->header_sections->header2 != NULL ) if( ( internal_handle->header_sections->header2 != NULL )
&& ( libewf_header_values_parse_header2( && ( libewf_header_values_parse_header2(
...@@ -3403,7 +3405,7 @@ int libewf_handle_parse_header_values( ...@@ -3403,7 +3405,7 @@ int libewf_handle_parse_header_values(
"%s: unable to parse header2.", "%s: unable to parse header2.",
function ); function );
result = -1; result_header2 = -1;
} }
if( ( internal_handle->header_sections->xheader != NULL ) if( ( internal_handle->header_sections->xheader != NULL )
&& ( libewf_header_values_parse_xheader( && ( libewf_header_values_parse_xheader(
...@@ -3419,12 +3421,21 @@ int libewf_handle_parse_header_values( ...@@ -3419,12 +3421,21 @@ int libewf_handle_parse_header_values(
"%s: unable to parse xheader.", "%s: unable to parse xheader.",
function ); function );
result = -1; result_xheader = -1;
} }
if( result != 1 ) if( ( result_header != 1 )
&& ( result_header2 != 1 )
&& ( result_xheader != 1 ) )
{ {
return( -1 ); return( -1 );
} }
if( ( result_header != 1 )
|| ( result_header2 != 1 )
|| ( result_xheader != 1 ) )
{
liberror_error_free(
error );
}
/* The EnCase2 and EnCase3 format are the same /* The EnCase2 and EnCase3 format are the same
* only the acquiry software version provides insight in which version of EnCase was used * only the acquiry software version provides insight in which version of EnCase was used
*/ */
......
...@@ -127,6 +127,7 @@ int libewf_read_io_handle_free( ...@@ -127,6 +127,7 @@ int libewf_read_io_handle_free(
liberror_error_t **error ) liberror_error_t **error )
{ {
static char *function = "libewf_read_io_handle_free"; static char *function = "libewf_read_io_handle_free";
int result = 1;
if( read_io_handle == NULL ) if( read_io_handle == NULL )
{ {
...@@ -151,13 +152,15 @@ int libewf_read_io_handle_free( ...@@ -151,13 +152,15 @@ int libewf_read_io_handle_free(
LIBERROR_RUNTIME_ERROR_FINALIZE_FAILED, LIBERROR_RUNTIME_ERROR_FINALIZE_FAILED,
"%s: unable to free crc errors.", "%s: unable to free crc errors.",
function ); function );
result = -1;
} }
memory_free( memory_free(
*read_io_handle ); *read_io_handle );
*read_io_handle = NULL; *read_io_handle = NULL;
} }
return( 1 ); return( result );
} }
/* Processes the chunk data, applies decompression if necessary and validates the CRC /* Processes the chunk data, applies decompression if necessary and validates the CRC
......
...@@ -84,10 +84,8 @@ ssize_t libewf_segment_file_read_file_header( ...@@ -84,10 +84,8 @@ ssize_t libewf_segment_file_read_file_header(
} }
#if defined( HAVE_DEBUG_OUTPUT ) #if defined( HAVE_DEBUG_OUTPUT )
libnotify_verbose_printf( libnotify_verbose_printf(
"%s: reading file header at offset: %" PRIu64 " (0x%08" PRIx64 ")\n", "%s: reading file header at offset: 0 (0x00000000)\n",
function, function );
0,
0 );
#endif #endif
if( libbfio_pool_seek_offset( if( libbfio_pool_seek_offset(
......
...@@ -140,6 +140,7 @@ int libewf_segment_file_handle_free( ...@@ -140,6 +140,7 @@ int libewf_segment_file_handle_free(
liberror_error_t **error ) liberror_error_t **error )
{ {
static char *function = "libewf_segment_file_handle_free"; static char *function = "libewf_segment_file_handle_free";
int result = 1;
if( segment_file_handle == NULL ) if( segment_file_handle == NULL )
{ {
...@@ -167,6 +168,8 @@ int libewf_segment_file_handle_free( ...@@ -167,6 +168,8 @@ int libewf_segment_file_handle_free(
LIBERROR_RUNTIME_ERROR_FINALIZE_FAILED, LIBERROR_RUNTIME_ERROR_FINALIZE_FAILED,
"%s: unable to free section list.", "%s: unable to free section list.",
function ); function );
result = -1;
} }
} }
memory_free( memory_free(
...@@ -174,6 +177,6 @@ int libewf_segment_file_handle_free( ...@@ -174,6 +177,6 @@ int libewf_segment_file_handle_free(
*segment_file_handle = NULL; *segment_file_handle = NULL;
} }
return( 1 ); return( result );
} }
...@@ -174,6 +174,7 @@ int libewf_segment_table_free( ...@@ -174,6 +174,7 @@ int libewf_segment_table_free(
{ {
static char *function = "libewf_segment_table_free"; static char *function = "libewf_segment_table_free";
uint16_t segment_table_iterator = 0; uint16_t segment_table_iterator = 0;
int result = 1;
if( segment_table == NULL ) if( segment_table == NULL )
{ {
...@@ -201,6 +202,8 @@ int libewf_segment_table_free( ...@@ -201,6 +202,8 @@ int libewf_segment_table_free(
"%s: unable to free segment file handle: %" PRIu16 ".", "%s: unable to free segment file handle: %" PRIu16 ".",
function, function,
segment_table_iterator + 1 ); segment_table_iterator + 1 );
result = -1;
} }
} }
memory_free( memory_free(
...@@ -216,7 +219,7 @@ int libewf_segment_table_free( ...@@ -216,7 +219,7 @@ int libewf_segment_table_free(
*segment_table = NULL; *segment_table = NULL;
} }
return( 1 ); return( result );
} }
/* Resizes the segment table /* Resizes the segment table
......
...@@ -4,4 +4,4 @@ ...@@ -4,4 +4,4 @@
\margl1440\margr1440\vieww9880\viewh13400\viewkind0 \margl1440\margr1440\vieww9880\viewh13400\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
\f0\fs24 \cf0 This will install a universal build of libewf 20091128 and the ewftools.} \f0\fs24 \cf0 This will install a universal build of libewf 20091224 and the ewftools.}
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