1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
Origin: backport, commit:0630461b734201db24139b0dc1657371fce41fb9
Author: Roman Pudashkin <r.pudashkin@gmail.com>
Description: Fixed a potential crash (CVE-2024-44866)
Added a similar check that already exists for other GP readers
--- a/mscore/importgtp.cpp
+++ b/mscore/importgtp.cpp
@@ -915,6 +915,8 @@ void GuitarPro1::read(QFile* fp)
int tuning[GP_MAX_STRING_NUMBER];
int strings = version > 101 ? readInt() : 6;
+ if (strings <= 0 || strings > GP_MAX_STRING_NUMBER)
+ throw GuitarProError::GP_BAD_NUMBER_OF_STRINGS;
for (int j = 0; j < strings; ++j)
tuning[j] = readInt();
int tuning2[strings];
|