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

one line typo in new attachment code #35

Closed ThomasDuBois closed 6 years ago

ThomasDuBois commented 7 years ago

The pypff_item for the attachment is being created as a pypff_message_type_object. It should be pypff_attachment_type_object.

Here's the fix:

      1 diff --git a/pypff/pypff_message.c b/pypff/pypff_message.c
      2 index 5d5a412..4154204 100644
      3 --- a/pypff/pypff_message.c
      4 +++ b/pypff/pypff_message.c
      5 @@ -1771,7 +1771,7 @@ PyObject *pypff_message_get_attachment_by_index(
      6                 goto on_error;
      7         }
      8         sub_item_object = pypff_item_new(
      9 -                          &pypff_message_type_object,
     10 +                          &pypff_attachment_type_object,
     11                            sub_item,
     12                            (PyObject *) ( (pypff_item_t *) pypff_item )->parent_object );
     13  
joachimmetz commented 7 years ago

This is WIP, I'll have a look when time permits

ThomasDuBois commented 7 years ago

I figured as much and wouldn't have filled it if I didn't have a fix ready.

Thanks for sharing all this work.

Tom

On Jan 17, 2017 12:47 AM, "Joachim Metz" notifications@github.com wrote:

This is WIP, I'll have a look when time permits

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/libyal/libpff/issues/35#issuecomment-273028199, or mute the thread https://github.com/notifications/unsubscribe-auth/AKz4UQUMasRqRsg-xphqH_IoO2I4escqks5rTFYPgaJpZM4LlO_F .

joachimmetz commented 6 years ago

Addressed in https://github.com/libyal/libpff/commit/ee17d7cb702ddf653c6b1d2caed050de142cd7cd