After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 728991 - GPermission public API type check is missing
GPermission public API type check is missing
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2014-04-25 23:16 UTC by Juan Pablo Ugarte
Modified: 2014-04-26 01:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Adds type check to GPermission public API (3.62 KB, patch)
2014-04-25 23:16 UTC, Juan Pablo Ugarte
accepted-commit_now Details | Review

Description Juan Pablo Ugarte 2014-04-25 23:16:19 UTC
Created attachment 275179 [details] [review]
Adds type check to GPermission public API

Take this function as an example

gboolean
g_permission_get_allowed (GPermission *permission)
{
  return permission->priv->allowed;
}

Since it does not have any type check function it will crash when trying to access permission if its NULL.
Comment 1 Matthias Clasen 2014-04-26 00:20:16 UTC
Review of attachment 275179 [details] [review]:

looks fine
Comment 2 Juan Pablo Ugarte 2014-04-26 01:02:22 UTC
pushed to master and glib-2-40 branch