add a compiler warning fix backport; prepare targetted fixes upload 3.2.3+dfsg2-9
authormirabilos <tg@debian.org>
Thu, 11 Feb 2021 01:24:34 +0000 (02:24 +0100)
committermirabilos <mirabilos@evolvis.org>
Thu, 11 Feb 2021 01:24:34 +0000 (02:24 +0100)
debian/changelog
debian/patches/series
debian/patches/upstream/sprintf.diff [new file with mode: 0644]

index 46ddb27..73b4db2 100644 (file)
@@ -1,8 +1,11 @@
-musescore3 (3.2.3+dfsg2-9~~test1) UNRELEASED; urgency=medium
+musescore3 (3.2.3+dfsg2-9) unstable; urgency=medium
 
-  * backports/plugin-parent.diff
+  * backports/plugin-parent.diff: fix crash when traversing from
+    an Element through its parents (in a QML plugin): missing
+    NULL return when the element has no parent
+  * upstream/sprintf.diff: fix (unlikely) sprintf overflow
 
- -- Thorsten Glaser <tg@mirbsd.de>  Wed, 10 Feb 2021 20:13:20 +0100
+ -- Thorsten Glaser <tg@mirbsd.de>  Thu, 11 Feb 2021 02:21:26 +0100
 
 musescore3 (3.2.3+dfsg2-8) unstable; urgency=medium
 
index 69fd2a7..d8b5638 100644 (file)
@@ -82,14 +82,15 @@ backports/plugin-select.diff
 backports/plugin-onRun.diff
 backports/plugin-size.diff
 backports/plugin-qml.diff
+backports/plugin-parent.diff
 backports/5507.patch
 backports/crash-F9.diff
-backports/plugin-parent.diff
 upstream/silence-qdebug.diff
 upstream/statusline-pitch-onofftime.diff
 upstream/improve-mscore-font.diff
 upstream/fix-accidental-paren-pos.diff
 upstream/smufl-fixes.diff
+upstream/sprintf.diff
 experiments/element-barbeat.diff
 experiments/revert-restriking-patch.diff
 experiments/log-collisions.diff
diff --git a/debian/patches/upstream/sprintf.diff b/debian/patches/upstream/sprintf.diff
new file mode 100644 (file)
index 0000000..085d41d
--- /dev/null
@@ -0,0 +1,25 @@
+Description: fix possible buffer overflow
+ compiler warning, very unlikely to hit in production
+ .
+ Better fix would be QString::asprintf() but Qt discourages that
+ for some unconceivable reason...
+Author: mirabilos <m@mirbsd.org>
+Forwarded: https://github.com/musescore/MuseScore/pull/5202
+Applied-Upstream: v3.3
+
+--- a/mscore/playpanel.cpp
++++ b/mscore/playpanel.cpp
+@@ -353,11 +353,11 @@ void PlayPanel::updatePosLabel(int utick
+       // alternative would be to use a monospaced font and a
+       // single label
+           
+-      char barBuffer[8];
++      char barBuffer[12];
+       sprintf(barBuffer, "%d", bar+1);// sprintf(barBuffer, "%03d", bar+1);
+       measureLabel->setText(QString(barBuffer));
+       
+-      char beatBuffer[8];
++      char beatBuffer[12];
+       sprintf(beatBuffer, "%02d", beat+1);
+       beatLabel->setText(QString(beatBuffer));
+       }