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 727957 - Broken check for non-empty strings
Broken check for non-empty strings
Status: RESOLVED FIXED
Product: gnome-online-accounts
Classification: Core
Component: general
3.10.x
Other All
: Normal normal
: ---
Assigned To: GNOME Online Accounts maintainer(s)
GNOME Online Accounts maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-04-10 11:09 UTC by Debarshi Ray
Modified: 2014-04-10 12:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix check for non-empty strings (3.65 KB, patch)
2014-04-10 11:12 UTC, Debarshi Ray
committed Details | Review

Description Debarshi Ray 2014-04-10 11:09:06 UTC
The check for non-empty strings is logically wrong. Instead of asserting (str != NULL && str[0] != '\0'), it does (str != NULL || str[0] != '\0'). So, if str ends up being NULL then we get a crash trying to access str[0].

See: https://bugzilla.redhat.com/show_bug.cgi?id=1064065
Comment 1 Debarshi Ray 2014-04-10 11:12:39 UTC
Created attachment 273977 [details] [review]
Fix check for non-empty strings