1
From: Fabian Vogt <fvogt@suse.com>
2
Date: Thu, 21 Jan 2016 10:39:21 +0100
3
Origin: vendor, https://build.opensuse.org/package/view_file/Base:System/plymouth/0003-fix_null_deref.patch
4
Forwarded: https://gitlab.freedesktop.org/plymouth/plymouth/-/merge_requests/91
5
Subject: [PATCH 4/7] ply-label: Don't crash if label plugin fails
7
The label plugin's create_control function can return NULL if allocation
8
failed, for example, but ply-label.c ignores that and uses the NULL control,
11
Signed-off-by: Fabian Vogt <fvogt@suse.com>
13
src/libply-splash-graphics/ply-label.c | 9 +++++++++
14
1 file changed, 9 insertions(+)
16
diff --git a/src/libply-splash-graphics/ply-label.c b/src/libply-splash-graphics/ply-label.c
17
index 703060a..2430ceb 100644
18
--- a/src/libply-splash-graphics/ply-label.c
19
+++ b/src/libply-splash-graphics/ply-label.c
20
@@ -130,6 +130,15 @@ ply_label_load_plugin (ply_label_t *label)
22
label->control = label->plugin_interface->create_control ();
24
+ if (label->control == NULL) {
26
+ label->plugin_interface = NULL;
27
+ ply_close_module (label->module_handle);
28
+ label->module_handle = NULL;
29
+ ply_restore_errno ();
33
if (label->text != NULL)
34
label->plugin_interface->set_text_for_control (label->control,