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
286 stars 74 forks source link

pffexport string encoding bug #47

Closed herosi closed 6 years ago

herosi commented 6 years ago

I found a bug in pffexport. If an item name includes wide character, then the item name get garbled. Please fix it.

diff -u export_handle.c.orig export_handle.c
--- export_handle.c.orig    2017-09-27 14:29:05.987164221 +0900
+++ export_handle.c 2017-09-27 14:31:06.817794771 +0900
@@ -3374,7 +3374,7 @@
            goto on_error;
        }
 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
-       if( libpff_record_entry_get_data_as_utf8_string(
+       if( libpff_record_entry_get_data_as_utf16_string(
             record_entry,
             (uint16_t *) *value_string,
             *value_string_size,
joachimmetz commented 6 years ago

thx for the report I have a look as soon at time permits

herosi commented 6 years ago

I should be the one thanking YOU! Your tools always help me. Thank you for providing great tools.

joachimmetz commented 6 years ago

Finally got around to this, pushed a fix.