ITADN

mupdf_new_derived_device doesn't account for T's alignment, making Device::from_native unsound

#185Closedprogrammerjake 创建于 2026-01-01
P
programmerjakecommented
`mupdf_new_derived_device` doesn't account for `T`'s alignment, making `Device::from_native` unsound because you can pass in a type `T` that requires alignment bigger than what `mupdf_new_device_of_size` returns. https://github.com/messense/mupdf-rs/blob/00ec3430e7ab251bc3b5272be1978526207f6d3c/mupdf-sys/src/lib.rs#L37-L53
关闭于 2026-01-07 1 条评论