msiemens / onenote.rs

A Rust OneNote file parser
Mozilla Public License 2.0
52 stars 16 forks source link

PropertType: Specify type for custom discriminant values #14

Open Kangie opened 2 months ago

Kangie commented 2 months ago

We use custom discriminant values for enum variants for "PropertType" without specifying the type. This causes it to default to "isize" which on 64bit platforms is big enough to hold the 32bit constants, but causes overflow when isize is 32bit.

This issue was uncovered due to build failures on arm for Gentoo Linux as a dependency of ClamAV.

Bug: https://bugs.gentoo.org/927214