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 742774 - [PATCH] Properly check result of g_utf8_get_char_validated()
[PATCH] Properly check result of g_utf8_get_char_validated()
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Class: GtkBuilder
3.15.x
Other All
: Normal normal
: ---
Assigned To: GtkBuilder maintainers
GtkBuilder maintainers
Depends on:
Blocks:
 
 
Reported: 2015-01-11 19:51 UTC by maksqwe
Modified: 2015-01-11 20:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (1.63 KB, patch)
2015-01-11 19:51 UTC, maksqwe
committed Details | Review

Description maksqwe 2015-01-11 19:51:12 UTC
Created attachment 294298 [details] [review]
Patch

g_utf8_get_char_validated() may return -1 or -2
return type is gunichar(guint32)

Therefore such checks like 'gunichar < 0' or 'gunichar > 0' are always 'false' or 'true'(except when gunichar == 0).