[gnome-remote-desktop] credentials-libsecret: Do not crash, when deleting legacy VNC password
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-remote-desktop] credentials-libsecret: Do not crash, when deleting legacy VNC password
- Date: Tue, 2 Aug 2022 15:16:00 +0000 (UTC)
commit b1c0acbe9f6d3cb60f09935bee05dacf7e255a95
Author: Pascal Nowack <Pascal Nowack gmx de>
Date: Tue Aug 2 06:37:35 2022 +0200
credentials-libsecret: Do not crash, when deleting legacy VNC password
While unlikely, there is no guarantee, that the legacy VNC password
still exists, when clearing it during the migration process.
So, protect against a crash here by checking whether an error was
actually set.
src/grd-credentials-libsecret.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/grd-credentials-libsecret.c b/src/grd-credentials-libsecret.c
index 72530cba..48bfe635 100644
--- a/src/grd-credentials-libsecret.c
+++ b/src/grd-credentials-libsecret.c
@@ -203,7 +203,8 @@ maybe_migrate_legacy_vnc_password (GrdCredentials *credentials)
else
{
if (!secret_password_clear_sync (GRD_VNC_LEGACY_PASSWORD_SCHEMA,
- NULL, &error, NULL))
+ NULL, &error, NULL) &&
+ error)
{
g_printerr ("Failed to clear VNC password from old schema: %s\n",
error->message);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]