mirror of https://github.com/GNOME/gimp.git
Issue #4392: Gimp Segmentation Fault triggered by Glib GParamSpec...
... property name validation. Slightly different fix on master compared to the gimp-2-10 branch. Here the GParamSpec creation will happen already on the plug-in process in libgimp. Let's just make sure we abort before we segfault. This will be enough for the plug-in developer to start debugging one's code. At least the core process is not crashing when the plug-in dev provides invalid param names.
This commit is contained in:
parent
44a7adfd9d
commit
9399c937df
|
@ -383,6 +383,12 @@ gimp_param_spec_layer (const gchar *name,
|
|||
|
||||
ispec = g_param_spec_internal (GIMP_TYPE_PARAM_LAYER,
|
||||
name, nick, blurb, flags);
|
||||
/* g_param_spec_internal() may fail if for instance @name is invalid.
|
||||
* We don't want to dereference the pointer and segfault in such a
|
||||
* case, so let's just fail here.
|
||||
* See #4392.
|
||||
*/
|
||||
g_return_val_if_fail (ispec, NULL);
|
||||
|
||||
ispec->none_ok = none_ok ? TRUE : FALSE;
|
||||
|
||||
|
|
Loading…
Reference in New Issue