ay_to_strv: Prevent dereferencing a NULL pointer.
* clang static analysis shows that ay_to_strv is called with argc set to NULL. This can cause ay_to_strv to dereference the pointer in a failure situation.
parent
97b740eb09
commit
a747813802
|
@ -82,6 +82,7 @@ ay_to_strv (GVariant *variant,
|
|||
data = g_variant_get_fixed_array (variant, &data_len, sizeof (char));
|
||||
if (data_len == 0 || data_len > G_MAXSSIZE)
|
||||
{
|
||||
if (argc != NULL)
|
||||
*argc = 0;
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue