Menu

#74 int to short sign extension bug (MSVC C++) libexif 0.6.15

open
nobody
libexif (62)
5
2018-06-30
2007-06-05
No

Under the MSVC C++ 2005 compilier, libexif is unable to parse most of an exif tag due to a sign extension when converting an ExifShort (uint16_t) to an enum (int).

For my purposes, I put in quick fixes on lines (attached):
-355 (exif_data_load_data_content() tag assignment);
-162 (exif_data_load_data_entry() entry->tag assignment);
-163 (exif_data_load_data_entry entry->format assignment);

There may be other places which require this fix or a more elegant one.

Discussion

  • David Tucker

    David Tucker - 2007-06-05

    exif-data.c

     
  • David Tucker

    David Tucker - 2007-06-05
    • summary: int to short sign extension bug (MSVC C++) --> int to short sign extension bug (MSVC C++) libexif 0.6.15
     
  • David Tucker

    David Tucker - 2007-06-05

    Logged In: YES
    user_id=1808825
    Originator: YES

    using libexif 0.6.15

     
  • David Tucker

    David Tucker - 2007-06-05

    Logged In: YES
    user_id=1808825
    Originator: YES

    using libexif 0.6.15

     
  • David Tucker

    David Tucker - 2007-06-05

    Logged In: YES
    user_id=1808825
    Originator: YES

    using libexif 0.6.15

     
  • Dan Fandrich

    Dan Fandrich - 2018-06-30

    Here is the proposed patch in unified diff form.

    Rather than 0xffff & does it work with an explicit cast to the enum type? And is that change really necessary on entry->components since both sides are unsigned?

     

Log in to post a comment.

MongoDB Logo MongoDB