<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/103717/">http://git.reviewboard.kde.org/r/103717/</a>
     </td>
    </tr>
   </table>
   <br />





 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This review has been submitted with commit 2404dd076c9e44f140d8aba61cd0f45a84493969 by Dennis Nienhüser to branch master.</pre>
 <br />







<p>- Commit</p>


<br />
<p>On January 17th, 2012, 5:24 p.m., Nikita Skovoroda wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Marble.</div>
<div>By Nikita Skovoroda.</div>


<p style="color: grey;"><i>Updated Jan. 17, 2012, 5:24 p.m.</i></p>






<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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).</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Does not crash when gpsd is not running any more.

gpsd version: 3.3</pre>
  </td>
 </tr>
</table>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>src/plugins/positionprovider/gpsd/GpsdConnection.cpp <span style="color: grey">(7fbe78a)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/103717/diff/" style="margin-left: 3em;">View Diff</a></p>




  </td>
 </tr>
</table>








  </div>
 </body>
</html>