Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Out-of-bounds string read in SettingsDialog #298

Open
jgcodes2020 opened this issue Oct 21, 2024 · 2 comments
Open

Out-of-bounds string read in SettingsDialog #298

jgcodes2020 opened this issue Oct 21, 2024 · 2 comments

Comments

@jgcodes2020
Copy link

jgcodes2020 commented Oct 21, 2024

Trying to open settings (Ctrl+T) causes an error at line 362, apparently during a call to QString::operator[].

for (const auto &p : this->pluginList)
{
index = ((int)p.Type - 1);
comboBox = comboBoxArray[index];
comboBox->addItem(QString::fromStdString(p.Name), QString::fromStdString(p.File));
if (pluginFileName[index] == QString::fromStdString(p.File))
{
comboBox->setCurrentText(QString::fromStdString(p.Name));
pluginFound[index] = true;
}
}

As far as I can tell, pluginFileNames is supposed to be an array of QString, so I have no idea what's going on.

@Rosalie241
Copy link
Owner

That's a nice catch, it's supposed to be

if (pluginFileNames[index] == QString::fromStdString(p.File))

I copy pasted some code from the commonPluginSettings function, which did things slightly differently.

I'll try to push the fix as soon as I'm on my desktop again ❤️

@Rosalie241
Copy link
Owner

Fixed it with 37839b0, I'll include it in the next release, thank you for reporting! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants