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 704484 - eula: strrchr can return null so check this before continuing
eula: strrchr can return null so check this before continuing
Status: RESOLVED FIXED
Product: gnome-initial-setup
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: GNOME Initial Setup maintainer(s)
GNOME Initial Setup maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-07-18 16:32 UTC by Michael Wood
Modified: 2013-07-19 14:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
eula: strrchr can return null so check this before continuing (1.25 KB, patch)
2013-07-18 16:32 UTC, Michael Wood
reviewed Details | Review
eula: replace strcmp with g_strcmp0 for null safety (1.07 KB, patch)
2013-07-19 10:56 UTC, Michael Wood
accepted-commit_now Details | Review

Description Michael Wood 2013-07-18 16:32:09 UTC
When determining the file type make sure that if strrchr returns null we
don't pass this to strcmp which will try to dereference it.
Comment 1 Michael Wood 2013-07-18 16:32:11 UTC
Created attachment 249545 [details] [review]
eula: strrchr can return null so check this before continuing
Comment 2 Jasper St. Pierre (not reading bugmail) 2013-07-18 17:04:18 UTC
Review of attachment 249545 [details] [review]:

Hm, couldn't you just use g_strcmp0 ?
Comment 3 Michael Wood 2013-07-19 10:56:37 UTC
Created attachment 249611 [details] [review]
eula: replace strcmp with g_strcmp0 for null safety

When determining the file type make sure that if strrchr returns null we
don't try to dereference it.
Comment 4 Jasper St. Pierre (not reading bugmail) 2013-07-19 11:14:06 UTC
Review of attachment 249611 [details] [review]:

OK.
Comment 5 Michael Wood 2013-07-19 14:21:34 UTC
master f20092f92f84bbeb18bca4ed9d23b443d6142025
gnome 3-8 f1de180748d2b3a69a69538eb47def37ae415658