commit fc3104c5410f5e887f02648babfc0ea692b275f0
Author: Jakub Bogusz <[email protected]>
Date:   Fri Jul 19 17:26:43 2019 +0200

    - updated to 20171104 (experimental; note: new soname)
    - removed obsolete system-libs,includes patches
    - added libcpath patch (adjust to current libcpath API)

 libewf-includes.patch    | 114 -----------------------
 libewf-libcpath.patch    | 231 +++++++++++++++++++++++++++++++++++++++++++++++
 libewf-system-libs.patch | 114 -----------------------
 libewf.spec              | 186 ++++++++++++++++++++++++++------------
 4 files changed, 357 insertions(+), 288 deletions(-)
---
diff --git a/libewf.spec b/libewf.spec
index d445a6f..2e8051c 100644
--- a/libewf.spec
+++ b/libewf.spec
@@ -1,53 +1,97 @@
 #
 # Conditional build:
-%bcond_without python  # Python bindings
+%bcond_without python  # Python bindings (any)
+%bcond_without python2 # CPython 2.x bindings
+%bcond_without python3 # CPython 3.x bindings
 #
+%if %{without python}
+%undefine      with_python2
+%undefine      with_python3
+%endif
+# see m4/${libname}.m4 />= for required version of particular library
+%define                libbfio_ver             20160108
+%define                libcaes_ver             20161025
+%define                libcdata_ver            20160108
+%define                libcdatetime_ver        20141018
+%define                libcerror_ver           20120425
+%define                libcfile_ver            20160409
+%define                libclocale_ver          20120425
+%define                libcnotify_ver          20120425
+%define                libcpath_ver            20120701
+%define                libcsplit_ver           20120701
+%define                libcthreads_ver         20160404
+%define                libfcache_ver           20140912
+%define                libfdata_ver            20160325
+%define                libfguid_ver            20120426
+%define                libfvalue_ver           20160131
+%define                libhmac_ver             20160802
+%define                libodraw_ver            20120630
+%define                libsmdev_ver            20140406
+%define                libsmraw_ver            20120630
+%define                libuna_ver              20120425
 Summary:       Library to support the Expert Witness Compression Format
 Summary(pl.UTF-8):     Biblioteka obsługująca format Expert Witness 
Compression Format
 Name:          libewf
-# see AC_INIT in configure.ac
-Version:       20150107
-%define        gitrev  f5aa33eaa9f93c60a9005c46c6afe88d8a46645e
-Release:       3
+Version:       20171104
+Release:       1
 License:       LGPL v3+
 Group:         Libraries
-Source0:       
https://github.com/libyal/libewf/archive/%{gitrev}/%{name}-%{version}.tar.gz
-# Source0-md5: 24ede215847822fe86a88a6ce77fac4a
-Patch0:                %{name}-system-libs.patch
-Patch1:                %{name}-includes.patch
+#Source0Download: https://github.com/libyal/libewf/releases
+Source0:       
https://github.com/libyal/libewf/releases/download/%{version}/%{name}-experimental-%{version}.tar.gz
+# Source0-md5: 1d64ca734b4dd07d0b793a855db5c31f
+Patch0:                %{name}-libcpath.patch
 URL:           https://github.com/libyal/libewf/
 BuildRequires: autoconf >= 2.59
 BuildRequires: automake >= 1.6
 BuildRequires: bzip2-devel >= 1.0
 BuildRequires: gettext-tools >= 0.18.1
-BuildRequires: libbfio-devel >= 20120426
-BuildRequires: libcaes-devel >= 20130716
-BuildRequires: libcdata-devel >= 20150102
-BuildRequires: libcdatetime-devel >= 20141018
-BuildRequires: libcerror-devel >= 20120425
-BuildRequires: libcfile-devel >= 20140503
-BuildRequires: libclocale-devel >= 20120425
-BuildRequires: libcnotify-devel >= 20120425
-BuildRequires: libcpath-devel >= 20120701
-BuildRequires: libcsplit-devel >= 20120701
+BuildRequires: libbfio-devel >= %{libbfio_ver}
+BuildRequires: libcaes-devel >= %{libcaes_ver}
+BuildRequires: libcdata-devel >= %{libcdata_ver}
+BuildRequires: libcdatetime-devel >= %{libcdatetime_ver}
+BuildRequires: libcerror-devel >= %{libcerror_ver}
+BuildRequires: libcfile-devel >= %{libcfile_ver}
+BuildRequires: libclocale-devel >= %{libclocale_ver}
+BuildRequires: libcnotify-devel >= %{libcnotify_ver}
+BuildRequires: libcpath-devel >= %{libcpath_ver}
+BuildRequires: libcsplit-devel >= %{libcsplit_ver}
 BuildRequires: libcstring-devel >= 20120425
 BuildRequires: libcsystem-devel >= 20141018
-BuildRequires: libcthreads-devel >= 20130509
-BuildRequires: libfcache-devel >= 20140601
-BuildRequires: libfdata-devel >= 20140915
+BuildRequires: libcthreads-devel >= %{libcthreads_ver}
+BuildRequires: libfcache-devel >= %{libfcache_ver}
+BuildRequires: libfdata-devel >= %{libfdata_ver}
+BuildRequires: libfguid-devel >= %{libfguid_ver}
 BuildRequires: libfuse-devel >= 2.6
-BuildRequires: libfvalue-devel >= 20130415
-BuildRequires: libhmac-devel >= 20130714
-BuildRequires: libodraw-devel >= 20120630
-BuildRequires: libsmdev-devel >= 20140406
-BuildRequires: libsmraw-devel >= 20120630
-BuildRequires: libuna-devel >= 20120425
+BuildRequires: libfvalue-devel >= %{libfvalue_ver}
+BuildRequires: libhmac-devel >= %{libhmac_ver}
+BuildRequires: libodraw-devel >= %{libodraw_ver}
+BuildRequires: libsmdev-devel >= %{libsmdev_ver}
+BuildRequires: libsmraw-devel >= %{libsmraw_ver}
+BuildRequires: libuna-devel >= %{libuna_ver}
 BuildRequires: libtool
 BuildRequires: libuuid-devel >= 2.20
 BuildRequires: openssl-devel >= 1.0
-%{?with_python:BuildRequires:  python-devel >= 1:2.5}
-BuildRequires: sed >= 4.0
+%{?with_python2:BuildRequires: python-devel >= 1:2.5}
+%{?with_python3:BuildRequires: python3-devel >= 1:3.2}
 BuildRequires: zlib-devel >= 1.2.5
+Requires:      bzip2 >= 1.0
+Requires:      libbfio >= %{libbfio_ver}
+Requires:      libcaes >= %{libcaes_ver}
+Requires:      libcdata >= %{libcdata_ver}
+Requires:      libcerror >= %{libcerror_ver}
+Requires:      libcfile >= %{libcfile_ver}
+Requires:      libclocale >= %{libclocale_ver}
+Requires:      libcnotify >= %{libcnotify_ver}
+Requires:      libcpath >= %{libcpath_ver}
+Requires:      libcsplit >= %{libcsplit_ver}
+Requires:      libcthreads >= %{libcthreads_ver}
+Requires:      libfcache >= %{libfcache_ver}
+Requires:      libfdata >= %{libfdata_ver}
+Requires:      libfguid >= %{libfguid_ver}
+Requires:      libfvalue >= %{libfvalue_ver}
+Requires:      libhmac >= %{libhmac_ver}
+Requires:      libuna >= %{libuna_ver}
+Requires:      zlib >= 1.2.5
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -68,21 +112,23 @@ Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libewf
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
 Requires:      bzip2-devel >= 1.0
-Requires:      libbfio-devel >= 20120426
-Requires:      libcaes-devel >= 20130716
-Requires:      libcdata-devel >= 20150102
-Requires:      libcerror-devel >= 20120425
-Requires:      libcfile-devel >= 20140503
-Requires:      libclocale-devel >= 20120425
-Requires:      libcnotify-devel >= 20120425
-Requires:      libcpath-devel >= 20120701
-Requires:      libcsplit-devel >= 20120701
+Requires:      libbfio-devel >= %{libbfio_ver}
+Requires:      libcaes-devel >= %{libcaes_ver}
+Requires:      libcdata-devel >= %{libcdata_ver}
+Requires:      libcerror-devel >= %{libcerror_ver}
+Requires:      libcfile-devel >= %{libcfile_ver}
+Requires:      libclocale-devel >= %{libclocale_ver}
+Requires:      libcnotify-devel >= %{libcnotify_ver}
+Requires:      libcpath-devel >= %{libcpath_ver}
+Requires:      libcsplit-devel >= %{libcsplit_ver}
 Requires:      libcstring-devel >= 20120425
-Requires:      libcthreads-devel >= 20130509
-Requires:      libfcache-devel >= 20140601
-Requires:      libfvalue-devel >= 20130415
-Requires:      libhmac-devel >= 20130714
-Requires:      libuna-devel >= 20120425
+Requires:      libcthreads-devel >= %{libcthreads_ver}
+Requires:      libfcache-devel >= %{libfcache_ver}
+Requires:      libfdata-devel >= %{libfdata_ver}
+Requires:      libfguid-devel >= %{libfguid_ver}
+Requires:      libfvalue-devel >= %{libfvalue_ver}
+Requires:      libhmac-devel >= %{libhmac_ver}
+Requires:      libuna-devel >= %{libuna_ver}
 Requires:      openssl-devel >= 1.0
 Requires:      zlib-devel >= 1.2.5
 
@@ -109,12 +155,13 @@ Summary:  Tools to support the Expert Witness Compression 
Format
 Summary(pl.UTF-8):     Narzędzia obsługujące format Expert Witness Compression 
Format
 Group:         Applications/File
 Requires:      %{name} = %{version}-%{release}
-Requires:      libcdatetime-devel >= 20141018
+Requires:      libcdatetime >= %{libcdatetime_ver}
 Requires:      libcsystem >= 20141018
 Requires:      libfuse >= 2.6
-Requires:      libodraw >= 20120630
-Requires:      libsmdev >= 20140406
-Requires:      libsmraw >= 20120630
+Requires:      libodraw >= %{libodraw_ver}
+Requires:      libsmdev >= %{libsmdev_ver}
+Requires:      libsmraw >= %{libsmraw_ver}
+Requires:      libuuid >= 2.20
 
 %description tools
 Tools to support the Expert Witness Compression Format.
@@ -123,32 +170,43 @@ Tools to support the Expert Witness Compression Format.
 Narzędzia obsługujące format Expert Witness Compression Format.
 
 %package -n python-pyewf
-Summary:       Python bindings for libewf library
-Summary(pl.UTF-8):     Wiązania Pythona do biblioteki libewf
+Summary:       Python 2 bindings for libewf library
+Summary(pl.UTF-8):     Wiązania Pythona 2 do biblioteki libewf
 Group:         Libraries/Python
 Requires:      %{name} = %{version}-%{release}
 
 %description -n python-pyewf
-Python bindings for libewf library.
+Python 2 bindings for libewf library.
 
 %description -n python-pyewf -l pl.UTF-8
-Wiązania Pythona do biblioteki libewf.
+Wiązania Pythona 2 do biblioteki libewf.
+
+%package -n python3-pyewf
+Summary:       Python 3 bindings for libewf library
+Summary(pl.UTF-8):     Wiązania Pythona 3 do biblioteki libewf
+Group:         Libraries/Python
+Requires:      %{name} = %{version}-%{release}
+
+%description -n python3-pyewf
+Python 3 bindings for libewf library.
+
+%description -n python3-pyewf -l pl.UTF-8
+Wiązania Pythona 3 do biblioteki libewf.
 
 %prep
-%setup -q -n %{name}-%{gitrev}
+%setup -q
 %patch0 -p1
-%patch1 -p1
 
 %build
 %{__gettextize}
-%{__sed} -i -e 's/ po\/Makefile.in//' configure.ac
 %{__libtoolize}
 %{__aclocal}
 %{__autoconf}
 %{__autoheader}
 %{__automake}
 %configure \
-       %{?with_python:--enable-python}
+       %{?with_python2:--enable-python2} \
+       %{?with_python3:--enable-python3}
 %{__make}
 
 %install
@@ -160,9 +218,12 @@ rm -rf $RPM_BUILD_ROOT
 # obsoleted by pkg-config
 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libewf.la
 
-%if %{with python}
+%if %{with python2}
 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/pyewf.{la,a}
 %endif
+%if %{with python3}
+%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/pyewf.{la,a}
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -174,11 +235,10 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc AUTHORS COPYING ChangeLog NEWS
 %attr(755,root,root) %{_libdir}/libewf.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libewf.so.2
+%attr(755,root,root) %ghost %{_libdir}/libewf.so.3
 
 %files devel
 %defattr(644,root,root,755)
-%doc documents/header*.txt
 %attr(755,root,root) %{_libdir}/libewf.so
 %{_includedir}/libewf
 %{_includedir}/libewf.h
@@ -207,8 +267,14 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man1/ewfrecover.1*
 %{_mandir}/man1/ewfverify.1*
 
-%if %{with python}
+%if %{with python2}
 %files -n python-pyewf
 %defattr(644,root,root,755)
 %attr(755,root,root) %{py_sitedir}/pyewf.so
 %endif
+
+%if %{with python3}
+%files -n python3-pyewf
+%defattr(644,root,root,755)
+%attr(755,root,root) %{py3_sitedir}/pyewf.so
+%endif
diff --git a/libewf-includes.patch b/libewf-includes.patch
deleted file mode 100644
index 8a14eb2..0000000
--- a/libewf-includes.patch
+++ /dev/null
@@ -1,114 +0,0 @@
---- libewf-f5aa33eaa9f93c60a9005c46c6afe88d8a46645e/ewftools/ewfacquire.c.orig 
2015-01-14 08:44:40.000000000 +0100
-+++ libewf-f5aa33eaa9f93c60a9005c46c6afe88d8a46645e/ewftools/ewfacquire.c      
2015-01-25 08:42:59.093079450 +0100
-@@ -26,6 +26,9 @@
- #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
- #include <stdlib.h>
- #endif
-+#if defined( HAVE_UNISTD_H )
-+#include <unistd.h>
-+#endif
- 
- #include "byte_size_string.h"
- #include "device_handle.h"
---- 
libewf-f5aa33eaa9f93c60a9005c46c6afe88d8a46645e/ewftools/ewfacquirestream.c.orig
   2015-01-14 08:44:40.000000000 +0100
-+++ 
libewf-f5aa33eaa9f93c60a9005c46c6afe88d8a46645e/ewftools/ewfacquirestream.c     
   2015-01-25 09:39:58.312935929 +0100
-@@ -30,6 +30,9 @@
- #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
- #include <stdlib.h>
- #endif
-+#if defined( HAVE_UNISTD_H )
-+#include <unistd.h>
-+#endif
- 
- #include "byte_size_string.h"
- #include "ewfcommon.h"
-@@ -323,7 +326,7 @@ ssize_t ewfacquirestream_read_chunk(
- 
-               while( read_number_of_errors <= read_error_retries )
-               {
--                      read_count = libcsystem_file_io_read(
-+                      read_count = read(
-                                     input_file_descriptor,
-                                     &( buffer[ buffer_offset + 
read_error_offset ] ),
-                                     bytes_to_read );
---- libewf-f5aa33eaa9f93c60a9005c46c6afe88d8a46645e/ewftools/ewfdebug.c.orig   
2015-01-14 08:44:40.000000000 +0100
-+++ libewf-f5aa33eaa9f93c60a9005c46c6afe88d8a46645e/ewftools/ewfdebug.c        
2015-01-25 09:40:21.596268288 +0100
-@@ -26,6 +26,9 @@
- #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
- #include <stdlib.h>
- #endif
-+#if defined( HAVE_UNISTD_H )
-+#include <unistd.h>
-+#endif
- 
- #if defined( HAVE_GLOB_H )
- #include <glob.h>
---- libewf-f5aa33eaa9f93c60a9005c46c6afe88d8a46645e/ewftools/ewfexport.c.orig  
2015-01-14 08:44:40.000000000 +0100
-+++ libewf-f5aa33eaa9f93c60a9005c46c6afe88d8a46645e/ewftools/ewfexport.c       
2015-01-25 09:40:45.122933951 +0100
-@@ -26,6 +26,9 @@
- #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
- #include <stdlib.h>
- #endif
-+#if defined( HAVE_UNISTD_H )
-+#include <unistd.h>
-+#endif
- 
- #if defined( HAVE_SYS_RESOURCE_H )
- #include <sys/resource.h>
---- libewf-f5aa33eaa9f93c60a9005c46c6afe88d8a46645e/ewftools/ewfinfo.c.orig    
2015-01-14 08:44:40.000000000 +0100
-+++ libewf-f5aa33eaa9f93c60a9005c46c6afe88d8a46645e/ewftools/ewfinfo.c 
2015-01-25 09:41:47.342931361 +0100
-@@ -26,6 +26,9 @@
- #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
- #include <stdlib.h>
- #endif
-+#if defined( HAVE_UNISTD_H )
-+#include <unistd.h>
-+#endif
- 
- #if defined( HAVE_SYS_RESOURCE_H )
- #include <sys/resource.h>
---- libewf-f5aa33eaa9f93c60a9005c46c6afe88d8a46645e/ewftools/ewfrecover.c.orig 
2015-01-14 08:44:40.000000000 +0100
-+++ libewf-f5aa33eaa9f93c60a9005c46c6afe88d8a46645e/ewftools/ewfrecover.c      
2015-01-25 09:42:07.626263849 +0100
-@@ -26,6 +26,9 @@
- #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
- #include <stdlib.h>
- #endif
-+#if defined( HAVE_UNISTD_H )
-+#include <unistd.h>
-+#endif
- 
- #if defined( HAVE_SYS_RESOURCE_H )
- #include <sys/resource.h>
---- libewf-f5aa33eaa9f93c60a9005c46c6afe88d8a46645e/ewftools/ewfverify.c.orig  
2015-01-14 08:44:40.000000000 +0100
-+++ libewf-f5aa33eaa9f93c60a9005c46c6afe88d8a46645e/ewftools/ewfverify.c       
2015-01-25 09:42:24.279596329 +0100
-@@ -26,6 +26,9 @@
- #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
- #include <stdlib.h>
- #endif
-+#if defined( HAVE_UNISTD_H )
-+#include <unistd.h>
-+#endif
- 
- #if defined( HAVE_SYS_RESOURCE_H )
- #include <sys/resource.h>
---- 
libewf-f5aa33eaa9f93c60a9005c46c6afe88d8a46645e/ewftools/export_handle.c.orig   
   2015-01-14 08:44:40.000000000 +0100
-+++ libewf-f5aa33eaa9f93c60a9005c46c6afe88d8a46645e/ewftools/export_handle.c   
2015-01-25 09:41:23.036265740 +0100
-@@ -1311,7 +1311,7 @@ ssize_t export_handle_write_buffer(
-       {
-               if( export_handle->use_stdout != 0 )
-               {
--                      write_count = libcsystem_file_io_write(
-+                      write_count = write(
-                                      1,
-                                      storage_media_buffer->raw_buffer,
-                                      write_size );
---- 
libewf-f5aa33eaa9f93c60a9005c46c6afe88d8a46645e/libewf/libewf_case_data.c.orig  
   2015-01-14 08:44:40.000000000 +0100
-+++ libewf-f5aa33eaa9f93c60a9005c46c6afe88d8a46645e/libewf/libewf_case_data.c  
2015-01-25 08:47:09.853068905 +0100
-@@ -28,6 +28,7 @@
- #include "libewf_header_values.h"
- #include "libewf_libcerror.h"
- #include "libewf_libcnotify.h"
-+#include "libewf_libcstring.h"
- #include "libewf_libfvalue.h"
- #include "libewf_libuna.h"
- #include "libewf_media_values.h"
diff --git a/libewf-libcpath.patch b/libewf-libcpath.patch
new file mode 100644
index 0000000..4a10c9c
--- /dev/null
+++ b/libewf-libcpath.patch
@@ -0,0 +1,231 @@
+From cc617ecd58c766245888089079913c68bbc11109 Mon Sep 17 00:00:00 2001
+From: Joachim Metz <[email protected]>
+Date: Mon, 16 Jul 2018 15:05:05 +0200
+Subject: [PATCH] Changes to file name sanitation in export handle
+
+---
+ ewftools/export_handle.c | 104 +++++++++++++++++++++++++--------------
+ 1 file changed, 68 insertions(+), 36 deletions(-)
+
+diff --git a/ewftools/export_handle.c b/ewftools/export_handle.c
+index 22f3d7c0..89aea2ec 100644
+--- a/ewftools/export_handle.c
++++ b/ewftools/export_handle.c
+@@ -5890,11 +5890,13 @@ int export_handle_export_single_files(
+      log_handle_t *log_handle,
+      libcerror_error_t **error )
+ {
+-      libewf_file_entry_t *file_entry = NULL;
+-      static char *function           = "export_handle_export_single_files";
+-      size_t export_path_size         = 0;
+-      int result                      = 0;
+-      int status                      = PROCESS_STATUS_COMPLETED;
++      libewf_file_entry_t *file_entry    = NULL;
++      system_character_t *sanitized_name = NULL;
++      static char *function              = 
"export_handle_export_single_files";
++      size_t export_path_length          = 0;
++      size_t sanitized_name_size         = 0;
++      int result                         = 0;
++      int status                         = PROCESS_STATUS_COMPLETED;
+ 
+       if( export_handle == NULL )
+       {
+@@ -5918,18 +5920,22 @@ int export_handle_export_single_files(
+ 
+               return( -1 );
+       }
+-      export_path_size = 1 + system_string_length(
+-                              export_handle->target_path );
++      export_path_length = system_string_length(
++                            export_handle->target_path );
+ 
+ #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
+-      if( libcpath_path_sanitize_wide(
++      if( libcpath_path_get_sanitized_path_wide(
+            export_handle->target_path,
+-           &export_path_size,
++           export_path_length,
++           &sanitized_name,
++           &sanitized_name_size,
+            error ) != 1 )
+ #else
+-      if( libcpath_path_sanitize(
++      if( libcpath_path_get_sanitized_path(
+            export_handle->target_path,
+-           &export_path_size,
++           export_path_length,
++           &sanitized_name,
++           &sanitized_name_size,
+            error ) != 1 )
+ #endif
+       {
+@@ -5991,11 +5997,11 @@ int export_handle_export_single_files(
+       }
+ #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
+       if( libcpath_path_make_directory_wide(
+-           export_handle->target_path,
++           sanitized_name,
+            error ) != 1 )
+ #else
+       if( libcpath_path_make_directory(
+-           export_handle->target_path,
++           sanitized_name,
+            error ) != 1 )
+ #endif
+       {
+@@ -6005,21 +6011,21 @@ int export_handle_export_single_files(
+                LIBCERROR_IO_ERROR_WRITE_FAILED,
+                "%s: unable to create directory: %" PRIs_SYSTEM "",
+                function,
+-               export_handle->target_path );
++               sanitized_name );
+ 
+               goto on_error;
+       }
+       log_handle_printf(
+        log_handle,
+        "Created directory: %" PRIs_SYSTEM ".\n",
+-       export_handle->target_path );
++       sanitized_name );
+ 
+       result = export_handle_export_file_entry(
+                 export_handle,
+                 file_entry,
+-                export_handle->target_path,
+-                export_path_size,
+-                export_path_size - 1,
++                sanitized_name,
++                sanitized_name_size,
++                sanitized_name_size - 1,
+                 log_handle,
+                 error );
+ 
+@@ -6034,6 +6040,11 @@ int export_handle_export_single_files(
+ 
+               goto on_error;
+       }
++      memory_free(
++       sanitized_name );
++
++      sanitized_name = NULL;
++
+       if( export_handle->abort != 0 )
+       {
+               status = PROCESS_STATUS_ABORTED;
+@@ -6099,6 +6110,11 @@ int export_handle_export_single_files(
+                &file_entry,
+                NULL );
+       }
++      if( sanitized_name != NULL )
++      {
++              memory_free(
++               sanitized_name );
++      }
+       return( -1 );
+ }
+ 
+@@ -6114,14 +6130,16 @@ int export_handle_export_file_entry(
+      log_handle_t *log_handle,
+      libcerror_error_t **error )
+ {
+-      system_character_t *name        = NULL;
+-      system_character_t *target_path = NULL;
+-      static char *function           = "export_handle_export_file_entry";
+-      size_t name_size                = 0;
+-      size_t target_path_size         = 0;
+-      uint8_t file_entry_type         = 0;
+-      int result                      = 0;
+-      int return_value                = 0;
++      system_character_t *name           = NULL;
++      system_character_t *sanitized_name = NULL;
++      system_character_t *target_path    = NULL;
++      static char *function              = "export_handle_export_file_entry";
++      size_t name_size                   = 0;
++      size_t sanitized_name_size         = 0;
++      size_t target_path_size            = 0;
++      uint8_t file_entry_type            = 0;
++      int result                         = 0;
++      int return_value                   = 0;
+ 
+       if( export_handle == NULL )
+       {
+@@ -6222,14 +6240,18 @@ int export_handle_export_file_entry(
+                       goto on_error;
+               }
+ #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
+-              if( libcpath_path_sanitize_filename_wide(
++              if( libcpath_path_get_sanitized_filename_wide(
+                    name,
+-                   &name_size,
++                   name_size - 1,
++                   &sanitized_name,
++                   &sanitized_name_size,
+                    error ) != 1 )
+ #else
+-              if( libcpath_path_sanitize_filename(
++              if( libcpath_path_get_sanitized_filename(
+                    name,
+-                   &name_size,
++                   name_size - 1,
++                   &sanitized_name,
++                   &sanitized_name_size,
+                    error ) != 1 )
+ #endif
+               {
+@@ -6242,14 +6264,19 @@ int export_handle_export_file_entry(
+ 
+                       goto on_error;
+               }
++              memory_free(
++               name );
++
++              name = NULL;
++
+ #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
+               if( libcpath_path_join_wide(
+                    &target_path,
+                    &target_path_size,
+                    export_path,
+                    export_path_size - 1,
+-                   name,
+-                   name_size - 1,
++                   sanitized_name,
++                   sanitized_name_size - 1,
+                    error ) != 1 )
+ #else
+               if( libcpath_path_join(
+@@ -6257,8 +6284,8 @@ int export_handle_export_file_entry(
+                    &target_path_size,
+                    export_path,
+                    export_path_size - 1,
+-                   name,
+-                   name_size - 1,
++                   sanitized_name,
++                   sanitized_name_size - 1,
+                    error ) != 1 )
+ #endif
+               {
+@@ -6272,9 +6299,9 @@ int export_handle_export_file_entry(
+                       goto on_error;
+               }
+               memory_free(
+-               name );
++               sanitized_name );
+ 
+-              name = NULL;
++              sanitized_name = NULL;
+ 
+               if( target_path == NULL )
+               {
+@@ -6443,6 +6470,11 @@ int export_handle_export_file_entry(
+               memory_free(
+                target_path );
+       }
++      if( sanitized_name != NULL )
++      {
++              memory_free(
++               sanitized_name );
++      }
+       if( name != NULL )
+       {
+               memory_free(
diff --git a/libewf-system-libs.patch b/libewf-system-libs.patch
deleted file mode 100644
index edd707a..0000000
--- a/libewf-system-libs.patch
+++ /dev/null
@@ -1,114 +0,0 @@
---- libewf-f5aa33eaa9f93c60a9005c46c6afe88d8a46645e/configure.ac.orig  
2015-01-14 08:44:40.000000000 +0100
-+++ libewf-f5aa33eaa9f93c60a9005c46c6afe88d8a46645e/configure.ac       
2015-01-25 07:52:56.099872114 +0100
-@@ -218,28 +218,7 @@ dnl Have configure make the Makefiles
- AC_CONFIG_FILES([Makefile])
- AC_CONFIG_FILES([include/Makefile])
- AC_CONFIG_FILES([common/Makefile])
--AC_CONFIG_FILES([libcstring/Makefile])
--AC_CONFIG_FILES([libcerror/Makefile])
--AC_CONFIG_FILES([libcthreads/Makefile])
--AC_CONFIG_FILES([libcdata/Makefile])
--AC_CONFIG_FILES([libclocale/Makefile])
--AC_CONFIG_FILES([libcdatetime/Makefile])
--AC_CONFIG_FILES([libcnotify/Makefile])
--AC_CONFIG_FILES([libcsplit/Makefile])
--AC_CONFIG_FILES([libuna/Makefile])
--AC_CONFIG_FILES([libcfile/Makefile])
--AC_CONFIG_FILES([libcpath/Makefile])
--AC_CONFIG_FILES([libbfio/Makefile])
--AC_CONFIG_FILES([libfcache/Makefile])
--AC_CONFIG_FILES([libfdata/Makefile])
--AC_CONFIG_FILES([libfvalue/Makefile])
--AC_CONFIG_FILES([libhmac/Makefile])
--AC_CONFIG_FILES([libcaes/Makefile])
- AC_CONFIG_FILES([libewf/Makefile])
--AC_CONFIG_FILES([libodraw/Makefile])
--AC_CONFIG_FILES([libsmdev/Makefile])
--AC_CONFIG_FILES([libsmraw/Makefile])
--AC_CONFIG_FILES([libcsystem/Makefile])
- AC_CONFIG_FILES([ewftools/Makefile])
- AC_CONFIG_FILES([ewf.net/Makefile])
- AC_CONFIG_FILES([pyewf/Makefile])
---- libewf-f5aa33eaa9f93c60a9005c46c6afe88d8a46645e/Makefile.am.orig   
2015-01-14 08:44:40.000000000 +0100
-+++ libewf-f5aa33eaa9f93c60a9005c46c6afe88d8a46645e/Makefile.am        
2015-01-25 07:53:22.973204319 +0100
-@@ -3,28 +3,7 @@ ACLOCAL_AMFLAGS = -I m4
- SUBDIRS = \
-       include \
-       common \
--      libcstring \
--      libcerror \
--      libcthreads \
--      libcdata \
--      libcdatetime \
--      libclocale \
--      libcnotify \
--      libcsplit \
--      libuna \
--      libcfile \
--      libcpath \
--      libbfio \
--      libfcache \
--      libfdata \
--      libfvalue \
--      libhmac \
--      libcaes \
-       libewf \
--      libodraw \
--      libsmdev \
--      libsmraw \
--      libcsystem \
-       ewftools \
-       ewf.net \
-       pyewf \
-@@ -79,22 +58,6 @@ lib: library
- 
- library:
-       (cd $(srcdir)/common && $(MAKE) $(AM_MAKEFLAGS))
--      (cd $(srcdir)/libcstring && $(MAKE) $(AM_MAKEFLAGS))
--      (cd $(srcdir)/libcerror && $(MAKE) $(AM_MAKEFLAGS))
--      (cd $(srcdir)/libcthreads && $(MAKE) $(AM_MAKEFLAGS))
--      (cd $(srcdir)/libcdata && $(MAKE) $(AM_MAKEFLAGS))
--      (cd $(srcdir)/libclocale && $(MAKE) $(AM_MAKEFLAGS))
--      (cd $(srcdir)/libcnotify && $(MAKE) $(AM_MAKEFLAGS))
--      (cd $(srcdir)/libcsplit && $(MAKE) $(AM_MAKEFLAGS))
--      (cd $(srcdir)/libuna && $(MAKE) $(AM_MAKEFLAGS))
--      (cd $(srcdir)/libcfile && $(MAKE) $(AM_MAKEFLAGS))
--      (cd $(srcdir)/libcpath && $(MAKE) $(AM_MAKEFLAGS))
--      (cd $(srcdir)/libbfio && $(MAKE) $(AM_MAKEFLAGS))
--      (cd $(srcdir)/libfcache && $(MAKE) $(AM_MAKEFLAGS))
--      (cd $(srcdir)/libfdata && $(MAKE) $(AM_MAKEFLAGS))
--      (cd $(srcdir)/libfvalue && $(MAKE) $(AM_MAKEFLAGS))
--      (cd $(srcdir)/libhmac && $(MAKE) $(AM_MAKEFLAGS))
--      (cd $(srcdir)/libcaes && $(MAKE) $(AM_MAKEFLAGS))
-       (cd $(srcdir)/libewf && $(MAKE) $(AM_MAKEFLAGS))
-       (cd $(srcdir)/po && $(MAKE) $(AM_MAKEFLAGS))
- 
-@@ -113,28 +76,7 @@ distclean: clean
-       done && test -z "$$fail"
- 
- splint:
--      (cd $(srcdir)/libcstring && $(MAKE) splint $(AM_MAKEFLAGS))
--      (cd $(srcdir)/libcerror && $(MAKE) splint $(AM_MAKEFLAGS))
--      (cd $(srcdir)/libcthreads && $(MAKE) splint $(AM_MAKEFLAGS))
--      (cd $(srcdir)/libcdata && $(MAKE) splint $(AM_MAKEFLAGS))
--      (cd $(srcdir)/libcdatetime && $(MAKE) splint $(AM_MAKEFLAGS))
--      (cd $(srcdir)/libclocale && $(MAKE) splint $(AM_MAKEFLAGS))
--      (cd $(srcdir)/libcnotify && $(MAKE) splint $(AM_MAKEFLAGS))
--      (cd $(srcdir)/libcsplit && $(MAKE) splint $(AM_MAKEFLAGS))
--      (cd $(srcdir)/libuna && $(MAKE) splint $(AM_MAKEFLAGS))
--      (cd $(srcdir)/libcfile && $(MAKE) splint $(AM_MAKEFLAGS))
--      (cd $(srcdir)/libcpath && $(MAKE) splint $(AM_MAKEFLAGS))
--      (cd $(srcdir)/libbfio && $(MAKE) splint $(AM_MAKEFLAGS))
--      (cd $(srcdir)/libfcache && $(MAKE) splint $(AM_MAKEFLAGS))
--      (cd $(srcdir)/libfdata && $(MAKE) splint $(AM_MAKEFLAGS))
--      (cd $(srcdir)/libfvalue && $(MAKE) splint $(AM_MAKEFLAGS))
--      (cd $(srcdir)/libhmac && $(MAKE) splint $(AM_MAKEFLAGS))
--      (cd $(srcdir)/libcaes && $(MAKE) splint $(AM_MAKEFLAGS))
-       (cd $(srcdir)/libewf && $(MAKE) splint $(AM_MAKEFLAGS))
--      (cd $(srcdir)/libodraw && $(MAKE) splint $(AM_MAKEFLAGS))
--      (cd $(srcdir)/libsmdev && $(MAKE) splint $(AM_MAKEFLAGS))
--      (cd $(srcdir)/libsmraw && $(MAKE) splint $(AM_MAKEFLAGS))
--      (cd $(srcdir)/libcsystem && $(MAKE) splint $(AM_MAKEFLAGS))
-       (cd $(srcdir)/ewftools && $(MAKE) splint $(AM_MAKEFLAGS))
-       (cd $(srcdir)/pyewf && $(MAKE) splint $(AM_MAKEFLAGS))
-       (cd $(srcdir)/po && $(MAKE) $(AM_MAKEFLAGS))
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libewf.git/commitdiff/fc3104c5410f5e887f02648babfc0ea692b275f0

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to