[Marble-devel] Review Request: Fix segfault with newer gpsd versions.

Nikita Skovoroda chalkerx at gmail.com
Tue Jan 17 17:24:42 UTC 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/103717/
-----------------------------------------------------------

(Updated Jan. 17, 2012, 5:24 p.m.)


Review request for Marble.


Description (updated)
-------

This patch adds a check for the stream method in libgpsmm to return not NULL value.
When that method returns NULL value, it's always should be treated as an error.

No new calls introduced (despite the #if block moved), just added a check for one return value.

Also see http://git.savannah.gnu.org/cgit/gpsd.git/commit/libgpsmm.cpp?id=ce15eae5b1170acebdbe88dd9a8a011a6d6957fb for explanation: «C++ clients should test the return from the stream method to see if the open succeeded.»

This fixes a segfault on newer glsd versions, and should not affect older versions.


How to reproduce the segfault without the patch: install gpsd, do not launch it, select gpsd as data provider. Marble segfaults (version 1.2.95).
Another way: start gpsd, select gpsd as marble data provider, close marble, stop gpsd. Marble would segfault on any future lauch, being unusable (until gpsd is lauched or confuguration manually altered).


Diffs
-----

  src/plugins/positionprovider/gpsd/GpsdConnection.cpp 7fbe78a 

Diff: http://git.reviewboard.kde.org/r/103717/diff/diff


Testing
-------

Does not crash when gpsd is not running any more.

gpsd version: 3.3


Thanks,

Nikita Skovoroda

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20120117/e07650ce/attachment.html>


More information about the Marble-devel mailing list