diff --git a/appveyor.yml b/appveyor.yml index 1178a0e8..3a3b47b1 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -208,13 +208,13 @@ test_script: - ps: If ($env:BUILD_ENVIRONMENT -eq "msbuild") { .\runtests.ps1 } - cmd: if [%BUILD_ENVIRONMENT%]==[cygwin] ( - C:\cygwin\bin\bash -e -l -c "cd libpff && ./configure ${CONFIGURE_OPTIONS} && make > /dev/null && make check CHECK_WITH_STDERR=1 || if test $? -ne 0 && test -f tests/test-suite.log; then cat tests/test-suite.log; fi" ) + C:\cygwin\bin\bash -e -l -c "cd libpff && ./configure ${CONFIGURE_OPTIONS} && make > /dev/null && make check CHECK_WITH_STDERR=1; RESULT=$?; if test ${RESULT} -ne 0 && test -f tests/test-suite.log; then cat tests/test-suite.log; fi; exit ${RESULT};" ) - cmd: if [%BUILD_ENVIRONMENT%]==[cygwin64] ( - C:\cygwin64\bin\bash -e -l -c "cd libpff && ./configure ${CONFIGURE_OPTIONS} && make > /dev/null && make check CHECK_WITH_STDERR=1 || if test $? -ne 0 && test -f tests/test-suite.log; then cat tests/test-suite.log; fi" ) + C:\cygwin64\bin\bash -e -l -c "cd libpff && ./configure ${CONFIGURE_OPTIONS} && make > /dev/null && make check CHECK_WITH_STDERR=1; RESULT=$?; if test ${RESULT} -ne 0 && test -f tests/test-suite.log; then cat tests/test-suite.log; fi; exit ${RESULT};" ) - cmd: if [%BUILD_ENVIRONMENT%]==[mingw] ( - C:\MinGW\msys\1.0\bin\bash -e -l -c "cd libpff && ./configure ${CONFIGURE_OPTIONS} && make > /dev/null && make check CHECK_WITH_STDERR=1 || if test $? -ne 0 && test -f tests/test-suite.log; then cat tests/test-suite.log; fi" ) + C:\MinGW\msys\1.0\bin\bash -e -l -c "cd libpff && ./configure ${CONFIGURE_OPTIONS} && make > /dev/null && make check CHECK_WITH_STDERR=1; RESULT=$?; if test ${RESULT} -ne 0 && test -f tests/test-suite.log; then cat tests/test-suite.log; fi; exit ${RESULT};" ) - cmd: if [%BUILD_ENVIRONMENT%]==[mingw-w64] ( - C:\msys64\usr\bin\bash -e -l -c "cd libpff && ./configure ${CONFIGURE_OPTIONS} && make > /dev/null && make check CHECK_WITH_STDERR=1 || if test $? -ne 0 && test -f tests/test-suite.log; then cat tests/test-suite.log; fi" ) + C:\msys64\usr\bin\bash -e -l -c "cd libpff && ./configure ${CONFIGURE_OPTIONS} && make > /dev/null && make check CHECK_WITH_STDERR=1; RESULT=$?; if test ${RESULT} -ne 0 && test -f tests/test-suite.log; then cat tests/test-suite.log; fi; exit ${RESULT};" ) after_test: - cmd: if [%TARGET%]==[mingw-gcc-no-optimization] ( diff --git a/configure.ac b/configure.ac index 624d413a..6ea457d7 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ( 2.59 ) AC_INIT( [libpff], - [20190112], + [20190114], [joachim.metz@gmail.com]) AC_CONFIG_SRCDIR( diff --git a/libpff/libpff_allocation_table.c b/libpff/libpff_allocation_table.c index 80b746f5..6fe8f162 100644 --- a/libpff/libpff_allocation_table.c +++ b/libpff/libpff_allocation_table.c @@ -59,6 +59,7 @@ int libpff_allocation_table_read_data( uint8_t allocation_table_type = 0; uint8_t allocation_table_type_copy = 0; uint8_t bit_index = 0; + int result = 0; #if defined( HAVE_DEBUG_OUTPUT ) uint64_t value_64bit = 0; @@ -376,14 +377,16 @@ int libpff_allocation_table_read_data( unallocated_size ); } #endif - if( libcdata_range_list_insert_range( - unallocated_block_list, - unallocated_offset, - unallocated_size, - NULL, - NULL, - NULL, - error ) != 1 ) + result = libcdata_range_list_insert_range( + unallocated_block_list, + unallocated_offset, + unallocated_size, + NULL, + NULL, + NULL, + error ); + + if( result == -1 ) { libcerror_error_set( error, @@ -414,14 +417,16 @@ int libpff_allocation_table_read_data( unallocated_size ); } #endif - if( libcdata_range_list_insert_range( - unallocated_block_list, - unallocated_offset, - unallocated_size, - NULL, - NULL, - NULL, - error ) != 1 ) + result = libcdata_range_list_insert_range( + unallocated_block_list, + unallocated_offset, + unallocated_size, + NULL, + NULL, + NULL, + error ); + + if( result == -1 ) { libcerror_error_set( error, diff --git a/libpff/libpff_free_map.c b/libpff/libpff_free_map.c index df3d5827..79bd4c8d 100644 --- a/libpff/libpff_free_map.c +++ b/libpff/libpff_free_map.c @@ -60,6 +60,7 @@ int libpff_free_map_read( uint8_t free_map_entry = 0; uint8_t free_map_type = 0; uint8_t free_map_type_copy = 0; + int result = 0; #if defined( HAVE_DEBUG_OUTPUT ) uint16_t value_16bit = 0; @@ -340,14 +341,16 @@ int libpff_free_map_read( } else if( unallocated_size > 0 ) { - if( libcdata_range_list_insert_range( - unallocated_block_list, - unallocated_offset, - unallocated_size, - NULL, - NULL, - NULL, - error ) != 1 ) + result = libcdata_range_list_insert_range( + unallocated_block_list, + unallocated_offset, + unallocated_size, + NULL, + NULL, + NULL, + error ); + + if( result == -1 ) { libcerror_error_set( error, @@ -367,14 +370,16 @@ int libpff_free_map_read( } if( unallocated_size > 0 ) { - if( libcdata_range_list_insert_range( - unallocated_block_list, - unallocated_offset, - unallocated_size, - NULL, - NULL, - NULL, - error ) != 1 ) + result = libcdata_range_list_insert_range( + unallocated_block_list, + unallocated_offset, + unallocated_size, + NULL, + NULL, + NULL, + error ); + + if( result == -1 ) { libcerror_error_set( error, diff --git a/m4/libcdata.m4 b/m4/libcdata.m4 index d2dc38db..2624f15f 100644 --- a/m4/libcdata.m4 +++ b/m4/libcdata.m4 @@ -1,6 +1,6 @@ dnl Checks for libcdata required headers and functions dnl -dnl Version: 20190104 +dnl Version: 20190112 dnl Function to detect if libcdata is available dnl ac_libcdata_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments @@ -25,7 +25,7 @@ AC_DEFUN([AX_LIBCDATA_CHECK_LIB], [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libcdata], - [libcdata >= 20190104], + [libcdata >= 20190112], [ac_cv_libcdata=yes], [ac_cv_libcdata=check]) ]) diff --git a/m4/tests.m4 b/m4/tests.m4 index f29cdba8..9f9f0224 100644 --- a/m4/tests.m4 +++ b/m4/tests.m4 @@ -1,6 +1,6 @@ dnl Functions for testing dnl -dnl Version: 20180905 +dnl Version: 20190112 dnl Function to detect if tests dependencies are available AC_DEFUN([AX_TESTS_CHECK_LOCAL], @@ -17,7 +17,7 @@ AC_DEFUN([AX_TESTS_CHECK_LOCAL], [AC_DEFINE( [HAVE_GNU_DL_DLSYM], [1], - [Define to 1 if dlsym funtion is available in GNU dl.]) + [Define to 1 if dlsym function is available in GNU dl.]) ]) ]) diff --git a/msvscpp/libcdata/libcdata.vcproj b/msvscpp/libcdata/libcdata.vcproj index 6eacb1fd..da70bfd3 100644 --- a/msvscpp/libcdata/libcdata.vcproj +++ b/msvscpp/libcdata/libcdata.vcproj @@ -158,6 +158,14 @@ RelativePath="..\..\libcdata\libcdata_btree.c" > + + + + @@ -200,6 +208,14 @@ RelativePath="..\..\libcdata\libcdata_btree.h" > + + + +