mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-20 19:43:01 +00:00
don't crash on invalid regular expressions.
2005-05-13 Michael Natterer <mitch@gimp.org> * app/plug-in/plug-ins-query.c (plug_ins_query): don't crash on invalid regular expressions.
This commit is contained in:
parent
92f5d97b9e
commit
9c16c2fc40
|
@ -1,3 +1,8 @@
|
|||
2005-05-13 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/plug-in/plug-ins-query.c (plug_ins_query): don't crash on
|
||||
invalid regular expressions.
|
||||
|
||||
2005-05-13 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* plug-ins/bmp/bmpwrite.c (WriteBMP): added missing brackets.
|
||||
|
|
|
@ -72,11 +72,19 @@ plug_ins_query (Gimp *gimp,
|
|||
g_return_val_if_fail (realname_strs != NULL, 0);
|
||||
g_return_val_if_fail (time_ints != NULL, 0);
|
||||
|
||||
if (search_str && strlen (search_str))
|
||||
regcomp (&sregex, search_str, REG_ICASE);
|
||||
else
|
||||
*menu_strs = NULL;
|
||||
*accel_strs = NULL;
|
||||
*prog_strs = NULL;
|
||||
*types_strs = NULL;
|
||||
*realname_strs = NULL;
|
||||
*time_ints = NULL;
|
||||
|
||||
if (search_str && ! strlen (search_str))
|
||||
search_str = NULL;
|
||||
|
||||
if (search_str && regcomp (&sregex, search_str, REG_ICASE))
|
||||
return 0;
|
||||
|
||||
/* count number of plugin entries, then allocate arrays of correct size
|
||||
* where we can store the strings.
|
||||
*/
|
||||
|
|
|
@ -72,11 +72,19 @@ plug_ins_query (Gimp *gimp,
|
|||
g_return_val_if_fail (realname_strs != NULL, 0);
|
||||
g_return_val_if_fail (time_ints != NULL, 0);
|
||||
|
||||
if (search_str && strlen (search_str))
|
||||
regcomp (&sregex, search_str, REG_ICASE);
|
||||
else
|
||||
*menu_strs = NULL;
|
||||
*accel_strs = NULL;
|
||||
*prog_strs = NULL;
|
||||
*types_strs = NULL;
|
||||
*realname_strs = NULL;
|
||||
*time_ints = NULL;
|
||||
|
||||
if (search_str && ! strlen (search_str))
|
||||
search_str = NULL;
|
||||
|
||||
if (search_str && regcomp (&sregex, search_str, REG_ICASE))
|
||||
return 0;
|
||||
|
||||
/* count number of plugin entries, then allocate arrays of correct size
|
||||
* where we can store the strings.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue