staff text filtering the % symbol?
In certain keyboard scores I include text that marks when I need to move the modulation wheel to a certain %, with the latest update it now seems like the % symbol is automatically filtered out of text lines. For example, if I go command T and type "wheel to 50%" and then exit the text formatting it becomes "wheel to 50". How can I be able to still use the % symbol?
Comments
Nice bug you found there! Please report it in the issue tracker
OMG, this is actually so (OS: macOS 10.15, Arch.: x86_64, MuseScore version (64-bit): 3.3.0.24090, revision: 4761df6). I had been using it frequently ("Phrasing by portato at 85%"), but not so recently, I guess. This is pretty awful.
In reply to OMG, this is actually so (OS… by [DELETED] 1831606
Is this exploitable when you use format specifiers like
%s
or worse%n
? ☻When was this introduced? tests… seems to be new in 3.3, and 3.2.3 not affected.
In reply to Is this exploitable when you… by mirabilos
I typed %s%d%n%a and got "sdna" and no crash.....
In reply to I typed %s%d%n%a and got … by [DELETED] 1831606
That is not likely to cause a buffer overrun I think.
It is not likely to cause that anyhow, I'm not aware of any scanf() like interpretation of % in staff text or any text input in MuseScore for that matter
In reply to That is not likely to cause… by Jojo-Schmitz
I was thinking printf, but BSG’s findings indicate it is not so… thankfully.
In reply to I was thinking printf, but… by mirabilos
Fortunatly this is C++, so no(t alot of) printf ;-)
In reply to Fortunatly this is C++, so… by Jojo-Schmitz
C++ faciitates making really cool argument-type-sensitive intefaces to sprintf and friends ... :) ... although with std::strings and std::str(n) you can get rid of most uses...
I looked into this but didn't get far. I can see the % is recorded in the text - the Object Debugger shows it as an ASCII/Unicode escape sequence. No idea why it isn't being processed correctly. I don't see any relevant changes in the code responsible for the editing or the displaying of text (textedit.cpp and textbase.cpp).
See now #296960: Percent sign cannot be entered into text