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 739494 - e-source-registry-server: Fix a potential NULL pointer dereference
e-source-registry-server: Fix a potential NULL pointer dereference
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Evolution Shell Maintainers Team
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2014-11-01 14:19 UTC by Philip Withnall
Modified: 2014-11-08 22:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
e-source-registry-server: Fix a potential NULL pointer dereference (1.09 KB, patch)
2014-11-01 14:19 UTC, Philip Withnall
committed Details | Review

Description Philip Withnall 2014-11-01 14:19:14 UTC
Trivial patch attached.
Comment 1 Philip Withnall 2014-11-01 14:19:17 UTC
Created attachment 289784 [details] [review]
e-source-registry-server: Fix a potential NULL pointer dereference

On the code path where backend is NULL, error is always NULL, so
dereferencing error->message will result in a crash.

Coverity issue: #1250457
Comment 2 Milan Crha 2014-11-06 14:09:21 UTC
Review of attachment 289784 [details] [review]:

Please adapt and commit to master and evolution-data-server-3-12. Thanks.

::: libebackend/e-source-registry-server.c
@@ +1181,3 @@
 				"No collection backend '%s' for %s: %s",
+				backend_name, e_source_get_uid (source),
+				(error != NULL) ? error->message : NULL);

I usually do in these cases:
   error ? error->message : "Unknown error"
It's better than passing NULL for the %s
Comment 3 Philip Withnall 2014-11-08 22:49:47 UTC
Committed to master. Committing to 3.12 shortly.

Attachment 289784 [details] pushed as 3b90f87 - e-source-registry-server: Fix a potential NULL pointer dereference
Comment 4 Philip Withnall 2014-11-08 22:51:22 UTC
(In reply to comment #3)
> Committing to 3.12 shortly.

The bug doesn’t exist on 3.12, actually, so I haven’t pushed there.