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 635768 - Protect g_file_monitor_set_rate_limit() against negative limit values
Protect g_file_monitor_set_rate_limit() against negative limit values
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
2.27.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2010-11-25 10:19 UTC by Aleksander Morgado
Modified: 2010-11-28 22:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for the issue (764 bytes, patch)
2010-11-25 10:21 UTC, Aleksander Morgado
none Details | Review

Description Aleksander Morgado 2010-11-25 10:19:54 UTC
Currently g_file_monitor_set_rate_limit() accepts a signed integer as limit_msecs value; which is defined in the property to be in the range [0,G_MAXINT]; but the method implementation doesn't actually check it when the value is passed.
Comment 1 Aleksander Morgado 2010-11-25 10:21:21 UTC
Created attachment 175233 [details] [review]
Patch for the issue

Just a g_return_if_fail() fixes this.