Closed taco-paco closed 2 years ago
How come that it is overwritten? Last time I checked, error_set just appends https://github.com/libyal/libcerror/blob/main/libcerror/libcerror_error.c#L362
If call libewf_internal_handle_open_file_io_pool
results with error then variable result
will be set to smth other then 1. Then inside if we set it to -1
but unlike in other cases we don't exit function. So when we reach call to libcthreads_read_write_lock_release_for_write which executes with success it will set result
to valid value 1. As result we will exit function successfully with internal_handle->file_io_pool
uninitialized which I think is incorrect behaviout
Ah if that is the issue you're pointing out, that's a matter of not setting result by libcthreads_read_write_lock_release_for_write. I'll make the necessary changes.
@taco-paco thx for flagging, changes in https://github.com/libyal/libewf/commit/3ba79a6b83b8e5c8b2a928a204cf8baa71d369d8
Errors from libewf_internal_handle_open_file_io_pool get overwritten here. I made a fork with fixes if there're no objections/issues I can open upstream pr.