[pulseaudio-commits] [Git][pulseaudio/paprefs][master] Fix ustring initialization from a NULL pointer
Arun Raghavan
gitlab at gitlab.freedesktop.org
Thu Jan 2 14:03:45 UTC 2020
Arun Raghavan pushed to branch master at PulseAudio / paprefs
Commits:
e30c1985 by Tanu Kaskinen at 2020-01-02T10:18:21+02:00
Fix ustring initialization from a NULL pointer
The packages vector was initialized from a and b, but b is sometimes
NULL. Glib::ustring can't be initialized from a NULL pointer, so the
initialization crashed.
This bug was introduced by the dbus-glib to gdbus conversion in commit
b8246d3f9b308770a49861cd2dea4d06cd88554e.
Fixes: https://gitlab.freedesktop.org/pulseaudio/paprefs/issues/4
- - - - -
1 changed file:
- src/paprefs.cc
Changes:
=====================================
src/paprefs.cc
=====================================
@@ -343,7 +343,10 @@ void MainWindow::showInstallButton(Gtk::Button *button, bool available) {
void MainWindow::installFiles(const char *a, const char *b = NULL) {
Glib::RefPtr<Gio::DBus::Proxy> proxy;
- const std::vector<Glib::ustring> packages = {a, b};
+ std::vector<Glib::ustring> packages = {a};
+
+ if (b)
+ packages.push_back(Glib::ustring(b));
proxy = Gio::DBus::Proxy::create_for_bus_sync(Gio::DBus::BusType::BUS_TYPE_SESSION,
"org.freedesktop.PackageKit",
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/paprefs/commit/e30c1985edd72af7e32b8b23b82cb8bcfb886f79
--
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/paprefs/commit/e30c1985edd72af7e32b8b23b82cb8bcfb886f79
You're receiving this email because of your account on gitlab.freedesktop.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20200102/11aceeb6/attachment.htm>
More information about the pulseaudio-commits
mailing list