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 730365 - plparse: Fix invalid check of non-dereferenced pointer against NULL
plparse: Fix invalid check of non-dereferenced pointer against NULL
Status: RESOLVED FIXED
Product: totem-pl-parser
Classification: Core
Component: General
unspecified
Other All
: Normal normal
: ---
Assigned To: totem-pl-parser-maint
totem-pl-parser-maint
Depends on:
Blocks:
 
 
Reported: 2014-05-19 10:12 UTC by Philip Withnall
Modified: 2014-05-19 11:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
plparse: Fix invalid check of non-dereferenced pointer against NULL (1.12 KB, patch)
2014-05-19 10:12 UTC, Philip Withnall
committed Details | Review

Description Philip Withnall 2014-05-19 10:12:45 UTC
Patch attached.
Comment 1 Philip Withnall 2014-05-19 10:12:47 UTC
Created attachment 276756 [details] [review]
plparse: Fix invalid check of non-dereferenced pointer against NULL

g_strsplit() guarantees to return a non-empty array. line is set to
lines+1, so can never be equal to 0 (i.e. NULL). It needs to be
dereferenced first to check for the array delimiter.

Coverity issue: #60477
Comment 2 Bastien Nocera 2014-05-19 10:19:35 UTC
Review of attachment 276756 [details] [review]:

Looks good
Comment 3 Philip Withnall 2014-05-19 11:28:18 UTC
Attachment 276756 [details] pushed as 6052b33 - plparse: Fix invalid check of non-dereferenced pointer against NULL