[MusicXML import] crashes MS 2.1 871c8ce

• Dec 13, 2017 - 07:24
Reported version
2.2
Type
Functional
Severity
S2 - Critical
Status
closed
Project
Tags

See https://musescore.org/en/node/267534.

Cause seems to be a corruption in the note start time calculation, debugging shows weird timestamps such as 298029592/-50151680.


Comments

Importing this file leads to subtracting Fraction 25200/100800 from 126000/100800 , which causes a numeric overflow, leading to incorrect timing calculations due to the large denominators being multiplied in an int.

At least for me (OS X, Clang) int is 32 bit.

Correct, see pull request 3355.
Note that the Fraction implementation is still vulnerable to overflows (in lcm() and most of the operator*() functions.