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 719540 - Clang static analysis fixes
Clang static analysis fixes
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Evolution Shell Maintainers Team
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2013-11-29 11:29 UTC by Philip Withnall
Modified: 2013-12-04 14:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
pine-importer: Fix a crash when importing with no existing address books (1.09 KB, patch)
2013-11-29 11:29 UTC, Philip Withnall
committed Details | Review
icalendar-importer: Fix a crash when importing with no existing cals (1.28 KB, patch)
2013-11-29 11:29 UTC, Philip Withnall
committed Details | Review

Description Philip Withnall 2013-11-29 11:29:26 UTC
A couple of patches fixing some bugs where a NULL pointer is potentially used when an object was expected (e.g. resulting in g_object_[un]ref(NULL)).

These were found by scan-build (http://www.murrayc.com/permalink/2013/11/15/jhbuild-and-clangs-scan-build/) with some GLib patches to mark functions as not accepting NULL arguments (bug #113075).
Comment 1 Philip Withnall 2013-11-29 11:29:28 UTC
Created attachment 263101 [details] [review]
pine-importer: Fix a crash when importing with no existing address books

This is a theoretical crash (not actually reproduced), caused by the
client variable being NULL if no address books exist. Instead of
crashing, gracefully exit with an error.

Found by scan-build.
Comment 2 Philip Withnall 2013-11-29 11:29:32 UTC
Created attachment 263102 [details] [review]
icalendar-importer: Fix a crash when importing with no existing cals

This is a theoretical crash (not actually reproduced) caused by calling
g_object_ref(source) when source is NULL, which can happen if no
calendars or task lists exist.

This fixes the crash, but there may be UI bugs if this condition is
reached.

Found by scan-build.