rtklibexplorer / RTKLIB

A version of RTKLIB optimized for low cost GNSS receivers, especially u-blox receivers. It is based on RTKLIB 2.4.3 and is kept reasonably closely synced to that branch. This software is provided “AS IS” without any warranties of any kind so please be careful, especially if using it in any kind of real-time application.
http://rtkexplorer.com/
Other
603 stars 236 forks source link

rtkplot_qt observation type codes not handled well #392

Closed ourairquality closed 1 week ago

ourairquality commented 1 week ago

In the Qt plot interface cBObservationType is given integer values for the frequencies and strings such as '2I' for the codes. The code reading back the selected option uses if (obstype.canConvert<int>()) to check if it is a frequency vs a code but this fails because this method returns true even for these codes, and then obstype.toInt() returns zero, and then 0 - 1 is used as an array index leading an OOB access.

JensReimann commented 1 week ago

Thank you for reporting the issue. It is not obvious that QString can be converted to int!

The latest version should address the problem and uses a different technique to distinguish between the types stored in obstype.

ourairquality commented 1 week ago

Thank you.