libyal / libpff

Library and tools to access the Personal Folder File (PFF) and the Offline Folder File (OFF) format
GNU Lesser General Public License v3.0
289 stars 74 forks source link

Multiple Issues #88

Closed radx4 closed 4 years ago

radx4 commented 4 years ago

Nice library. I found libpff to be highly useful for parsing Outlook mailbox files. In using libpff, though, I encountered a few issues:

  1. The distribution of pypff on pypi does not include zlib and cannot handle compressed content, which makes its utility very limited. Also, it is distributed as source and requires Visual Studio to compile, which not everyone doing Python development has. It seems like it would make a lot more sense to distribute compiled binaries.

  2. In libpff/libpff_io_handle2.c:301 offset_index_value->data_size is used when reading data lists. However, for compressed lists this is actually the compressed size, which can result in list read failures. I believe the correct variable to use here is the decompressed size, which can be accessed as data_block->uncompressed_data_size.

  3. There are two mistakes in libcpath/libcpath_path.c in memory cleanup on function failures. These are on lines 2975 and 6235. The variable path is freed, whereas *path should be freed. Neither of these functions are actually called in libpff (and the Windows heap has good validation), so it's not a huge deal, but it still should be fixed. I found these mistakes using Visual Studio's code analysis, which is quite handy.

joachimmetz commented 4 years ago

@radx4 what version of libpff and libcpath are you specifically referring to?

Also pypff is experimental https://github.com/libyal/libpff/issues/2, I see pypi dropped that piece of information

radx4 commented 4 years ago

I believe I acquired the source from the 20180714 release.

joachimmetz commented 4 years ago

It seems like it would make a lot more sense to distribute compiled binaries.

No it does not, the code is experimental, not even finished yet. Also maintaining executables is yet another cost on my plate I don't have time for.

The distribution of pypff on pypi does not include zlib and cannot handle compressed content,

this has been addressed in later versions by including a fallback zlib/deflate implementation.

In libpff/libpff_io_handle2.c:301

libpff/libpff_io_handle2.c is part of an ongoing refactor and will get updated when time permits

I believe I acquired the source from the 20180714 release.

can you double check, I would need to know the exact version of libcpath you are referring to

joachimmetz commented 4 years ago

No response from reporter, closing issue.