Cykooz / libheif-rs

Safe wrapper to libheif-sys for parsing heif/heic files
MIT License
34 stars 11 forks source link

fix: Make sure the decoder options isn't freed #21

Closed hfiguiere closed 5 months ago

hfiguiere commented 5 months ago

Without the as_ref(), the decoding_options gets dropped, dropping the allocated inner. Then the values inside become garbage, including ignore_transformations.

Note: there is no testing of this in the teste suite. I couldn't figure out how make a proper sample as merely changing the orientation with ExifTool isn't enough. If I figure it out, I can submit a PR testing ignore_transformations.

Cykooz commented 5 months ago

Thank you.