-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4128 from lvinken/277230-musicxml-corruption
fix #277230 - MuseScore saves a corrupted file after importing a Musi…
- Loading branch information
Showing
8 changed files
with
1,174 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 3.1 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd"> | ||
<score-partwise version="3.1"> | ||
<work> | ||
<work-number>MuseScore testfile</work-number> | ||
<work-title>Fraction::operator-=()</work-title> | ||
</work> | ||
<identification> | ||
<encoding> | ||
<software>MuseScore 0.7.0</software> | ||
<encoding-date>2007-09-10</encoding-date> | ||
<supports element="accidental" type="yes"/> | ||
<supports element="beam" type="yes"/> | ||
<supports element="print" attribute="new-page" type="no"/> | ||
<supports element="print" attribute="new-system" type="no"/> | ||
<supports element="stem" type="yes"/> | ||
</encoding> | ||
<miscellaneous> | ||
<miscellaneous-field name="description"> | ||
When compiled with 32-bit ints, importing this file produces an integer overflow in lcm() | ||
when called by Fraction::operator-=(). Causes undefined behaviour, but apparently current | ||
compilers and/or compiler settings result in ignoring the overflow. End effect is corruption | ||
of the internal data structures and invalid files written. | ||
The divisions value used is similar to the one used by Myriad Harmony Assistant v9.7.1c. | ||
</miscellaneous-field> | ||
</miscellaneous> | ||
</identification> | ||
<part-list> | ||
<score-part id="P1"> | ||
<part-name>Music</part-name> | ||
<score-instrument id="P1-I1"> | ||
<instrument-name>Music</instrument-name> | ||
</score-instrument> | ||
<midi-device id="P1-I1" port="1"></midi-device> | ||
<midi-instrument id="P1-I1"> | ||
<midi-channel>1</midi-channel> | ||
<midi-program>1</midi-program> | ||
<volume>78.7402</volume> | ||
<pan>0</pan> | ||
</midi-instrument> | ||
</score-part> | ||
</part-list> | ||
<part id="P1"> | ||
<measure number="1"> | ||
<attributes> | ||
<divisions>11586</divisions> | ||
<key> | ||
<fifths>0</fifths> | ||
</key> | ||
<time> | ||
<beats>2</beats> | ||
<beat-type>4</beat-type> | ||
</time> | ||
<clef> | ||
<sign>G</sign> | ||
<line>2</line> | ||
</clef> | ||
</attributes> | ||
<note> | ||
<pitch> | ||
<step>C</step> | ||
<octave>4</octave> | ||
</pitch> | ||
<duration>11586</duration> | ||
<type>quarter</type> | ||
</note> | ||
<forward> | ||
<duration>1</duration> | ||
</forward> | ||
<backup> | ||
<duration>1</duration> | ||
</backup> | ||
<note> | ||
<pitch> | ||
<step>C</step> | ||
<octave>4</octave> | ||
</pitch> | ||
<duration>11586</duration> | ||
<type>quarter</type> | ||
</note> | ||
</measure> | ||
</part> | ||
</score-partwise> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 3.1 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd"> | ||
<score-partwise version="3.1"> | ||
<work> | ||
<work-number>MuseScore testfile</work-number> | ||
<work-title>Fraction::operator-=()</work-title> | ||
</work> | ||
<identification> | ||
<encoding> | ||
<software>MuseScore 0.7.0</software> | ||
<encoding-date>2007-09-10</encoding-date> | ||
<supports element="accidental" type="yes"/> | ||
<supports element="beam" type="yes"/> | ||
<supports element="print" attribute="new-page" type="no"/> | ||
<supports element="print" attribute="new-system" type="no"/> | ||
<supports element="stem" type="yes"/> | ||
</encoding> | ||
</identification> | ||
<part-list> | ||
<score-part id="P1"> | ||
<part-name>Music</part-name> | ||
<score-instrument id="P1-I1"> | ||
<instrument-name>Music</instrument-name> | ||
</score-instrument> | ||
<midi-device id="P1-I1" port="1"></midi-device> | ||
<midi-instrument id="P1-I1"> | ||
<midi-channel>1</midi-channel> | ||
<midi-program>1</midi-program> | ||
<volume>78.7402</volume> | ||
<pan>0</pan> | ||
</midi-instrument> | ||
</score-part> | ||
</part-list> | ||
<part id="P1"> | ||
<measure number="1"> | ||
<attributes> | ||
<divisions>1</divisions> | ||
<key> | ||
<fifths>0</fifths> | ||
</key> | ||
<time> | ||
<beats>2</beats> | ||
<beat-type>4</beat-type> | ||
</time> | ||
<clef> | ||
<sign>G</sign> | ||
<line>2</line> | ||
</clef> | ||
</attributes> | ||
<note> | ||
<pitch> | ||
<step>C</step> | ||
<octave>4</octave> | ||
</pitch> | ||
<duration>1</duration> | ||
<voice>1</voice> | ||
<type>quarter</type> | ||
<stem>up</stem> | ||
</note> | ||
<note> | ||
<pitch> | ||
<step>C</step> | ||
<octave>4</octave> | ||
</pitch> | ||
<duration>1</duration> | ||
<voice>1</voice> | ||
<type>quarter</type> | ||
<stem>up</stem> | ||
</note> | ||
</measure> | ||
</part> | ||
</score-partwise> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 3.1 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd"> | ||
<score-partwise version="3.1"> | ||
<work> | ||
<work-number>MuseScore testfile</work-number> | ||
<work-title>Fraction::operator+=()</work-title> | ||
</work> | ||
<identification> | ||
<encoding> | ||
<software>MuseScore 0.7.0</software> | ||
<encoding-date>2007-09-10</encoding-date> | ||
<supports element="accidental" type="yes"/> | ||
<supports element="beam" type="yes"/> | ||
<supports element="print" attribute="new-page" type="no"/> | ||
<supports element="print" attribute="new-system" type="no"/> | ||
<supports element="stem" type="yes"/> | ||
</encoding> | ||
<miscellaneous> | ||
<miscellaneous-field name="description"> | ||
When compiled with 32-bit ints, importing this file produces an integer overflow in lcm() | ||
when called by Fraction::operator+=(). Causes undefined behaviour, but apparently current | ||
compilers and/or compiler settings result in ignoring the overflow. End effect is corruption | ||
of the internal data structures and invalid files written. | ||
The divisions value used is similar to the one used by Myriad Harmony Assistant v9.7.1c. | ||
</miscellaneous-field> | ||
</miscellaneous> | ||
</identification> | ||
<part-list> | ||
<score-part id="P1"> | ||
<part-name>Music</part-name> | ||
<score-instrument id="P1-I1"> | ||
<instrument-name>Music</instrument-name> | ||
</score-instrument> | ||
<midi-device id="P1-I1" port="1"></midi-device> | ||
<midi-instrument id="P1-I1"> | ||
<midi-channel>1</midi-channel> | ||
<midi-program>1</midi-program> | ||
<volume>78.7402</volume> | ||
<pan>0</pan> | ||
</midi-instrument> | ||
</score-part> | ||
</part-list> | ||
<part id="P1"> | ||
<measure number="1"> | ||
<attributes> | ||
<divisions>11586</divisions> | ||
<key> | ||
<fifths>0</fifths> | ||
</key> | ||
<time> | ||
<beats>2</beats> | ||
<beat-type>4</beat-type> | ||
</time> | ||
<clef> | ||
<sign>G</sign> | ||
<line>2</line> | ||
</clef> | ||
</attributes> | ||
<note> | ||
<pitch> | ||
<step>C</step> | ||
<octave>4</octave> | ||
</pitch> | ||
<duration>11586</duration> | ||
<type>quarter</type> | ||
</note> | ||
<forward> | ||
<duration>1</duration> | ||
</forward> | ||
<forward> | ||
<duration>1</duration> | ||
</forward> | ||
<note> | ||
<pitch> | ||
<step>C</step> | ||
<octave>4</octave> | ||
</pitch> | ||
<duration>11586</duration> | ||
<type>quarter</type> | ||
</note> | ||
</measure> | ||
</part> | ||
</score-partwise> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 3.1 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd"> | ||
<score-partwise version="3.1"> | ||
<work> | ||
<work-number>MuseScore testfile</work-number> | ||
<work-title>Fraction::operator+=()</work-title> | ||
</work> | ||
<identification> | ||
<encoding> | ||
<software>MuseScore 0.7.0</software> | ||
<encoding-date>2007-09-10</encoding-date> | ||
<supports element="accidental" type="yes"/> | ||
<supports element="beam" type="yes"/> | ||
<supports element="print" attribute="new-page" type="no"/> | ||
<supports element="print" attribute="new-system" type="no"/> | ||
<supports element="stem" type="yes"/> | ||
</encoding> | ||
</identification> | ||
<part-list> | ||
<score-part id="P1"> | ||
<part-name>Music</part-name> | ||
<score-instrument id="P1-I1"> | ||
<instrument-name>Music</instrument-name> | ||
</score-instrument> | ||
<midi-device id="P1-I1" port="1"></midi-device> | ||
<midi-instrument id="P1-I1"> | ||
<midi-channel>1</midi-channel> | ||
<midi-program>1</midi-program> | ||
<volume>78.7402</volume> | ||
<pan>0</pan> | ||
</midi-instrument> | ||
</score-part> | ||
</part-list> | ||
<part id="P1"> | ||
<measure number="1"> | ||
<attributes> | ||
<divisions>1</divisions> | ||
<key> | ||
<fifths>0</fifths> | ||
</key> | ||
<time> | ||
<beats>2</beats> | ||
<beat-type>4</beat-type> | ||
</time> | ||
<clef> | ||
<sign>G</sign> | ||
<line>2</line> | ||
</clef> | ||
</attributes> | ||
<note> | ||
<pitch> | ||
<step>C</step> | ||
<octave>4</octave> | ||
</pitch> | ||
<duration>1</duration> | ||
<voice>1</voice> | ||
<type>quarter</type> | ||
<stem>up</stem> | ||
</note> | ||
<note> | ||
<pitch> | ||
<step>C</step> | ||
<octave>4</octave> | ||
</pitch> | ||
<duration>1</duration> | ||
<voice>1</voice> | ||
<type>quarter</type> | ||
<stem>up</stem> | ||
</note> | ||
</measure> | ||
</part> | ||
</score-partwise> |
Oops, something went wrong.