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 680704 - g_utf8_strup() crash
g_utf8_strup() crash
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: i18n
2.33.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2012-07-27 13:01 UTC by Lionel Landwerlin
Modified: 2012-07-27 17:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch v1 (617 bytes, patch)
2012-07-27 13:01 UTC, Lionel Landwerlin
reviewed Details | Review

Description Lionel Landwerlin 2012-07-27 13:01:37 UTC
Created attachment 219738 [details] [review]
Patch v1

g_utf8_strup() tries to call setlocale() before starting to compute the length of its first argument. Calling setlocale() can return NULL (as specified in the man page), and obviously that happens on android.

Attached is a patch to handle that case.
Comment 1 Colin Walters 2012-07-27 13:05:46 UTC
Review of attachment 219738 [details] [review]:

The patch looks good, but can you please add the extra information you wrote into the bug report into the patch commit message itself, and add a link to this bug?  See https://live.gnome.org/GnomeLove/SubmittingPatches
Comment 2 Colin Walters 2012-07-27 13:06:03 UTC
(Please commit after that)
Comment 3 Lionel Landwerlin 2012-07-27 17:46:04 UTC
Thanks, pushed.