messense / mupdf-rs

Rust binding to mupdf
GNU Affero General Public License v3.0
104 stars 23 forks source link

Fix use-after-free in DocumentWriter::end_page #50

Closed Jesse-Bakker closed 2 years ago

Jesse-Bakker commented 2 years ago

Fixes #43

Jesse-Bakker commented 2 years ago

Not sure where the heap corruption on windows comes from. Checking with miri now.

EDIT: miri can't call foreign functions of course :sweat_smile:

Jesse-Bakker commented 2 years ago

Alright, when the document writer open fails, memory corruption happens sometimes. Probably panic-unsafety.

Edit: Nope, just an oversight by me, when page_end fails