libyal / libewf-legacy

Legacy version of libewf
GNU Lesser General Public License v3.0
10 stars 5 forks source link

unable to compile with openssl 3 #18

Closed simsong closed 2 years ago

simsong commented 2 years ago

Here are the errors:

ewftools_output.c: In function ‘ewftools_output_version_detailed_fprint’:
ewftools_output.c:244:10: error: ‘SHLIB_VERSION_NUMBER’ undeclared (first use in this function); did you mean ‘SSLEAY_VERSION_NUMBER’?
  244 |          SHLIB_VERSION_NUMBER );
      |          ^~~~~~~~~~~~~~~~~~~~
      |          SSLEAY_VERSION_NUMBER
ewftools_output.c:244:10: note: each undeclared identifier is reported only once for each function it appears in

Here are the warnings:

  CC       libewf_header_values.lo
libewf_header_values.c: In function ‘libewf_header_values_convert_utf8_header_string_to_header’:
libewf_header_values.c:2648:25: warning: pointer ‘header’ used after ‘free’ [-Wuse-after-free]
 2648 |                 *header = NULL;
      |                         ^
In file included from libewf_header_values.c:23:
../common/memory.h:100:9: note: call to ‘free’ here
  100 |         free( (void *) buffer )
      |         ^~~~~~~~~~~~~~~~~~~~~~~
libewf_header_values.c:2645:17: note: in expansion of macro ‘memory_free’
 2645 |                 memory_free(
      |                 ^~~~~~~~~~~
  CC       libsmraw_information_file.lo
libsmraw_information_file.c: In function ‘libsmraw_information_file_read_section’:
libsmraw_information_file.c:548:68: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
  548 |                                 input_string[ input_string_index ] = 0;
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
libsmraw_information_file.c:368:14: note: at offset 128 into destination object ‘input_string’ of size 128
  368 |         char input_string[ 128 ];
      |              ^~~~~~~~~~~~

It's easy to launch from here

joachimmetz commented 2 years ago

this is openSSL 3 related, as a work around you can configure with --with-openssl=no or compile against the latest version of openssl 1

joachimmetz commented 2 years ago

Changes in https://github.com/libyal/libewf-legacy/commit/685f340bff34d45220da72e273c6a3a0eb0862bb