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

misprint fix in libpff_record_entry_get_multi_value #130

Open Agile86 opened 3 months ago

Agile86 commented 3 months ago

We need to copy uint32 from array to value, not vice versa.

diff --git a/libpff/libpff_record_entry.c b/libpff/libpff_record_entry.c
index 9632eff..f9f9fd9 100644
--- a/libpff/libpff_record_entry.c
+++ b/libpff/libpff_record_entry.c
@@ -2710,7 +2710,7 @@ int libpff_record_entry_get_multi_value(
                        case LIBPFF_VALUE_TYPE_MULTI_VALUE_BINARY_DATA:
                                /* The first 4 bytes contain the number of values
                                 */
-                               byte_stream_copy_from_uint32_little_endian(
+                               byte_stream_copy_to_uint32_little_endian(
                                 internal_record_entry->value_data,
                                 internal_multi_value->number_of_values );