summaryrefslogtreecommitdiff
path: root/gpsd.c
diff options
context:
space:
mode:
Diffstat (limited to 'gpsd.c')
-rw-r--r--gpsd.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gpsd.c b/gpsd.c
index 2381e17c..6f575cd5 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -1474,10 +1474,16 @@ static void all_reports(struct gps_device_t *device, gps_mask_t changed)
* If the device provided an RTCM packet, repeat it to all devices.
*/
if ((changed & RTCM2_SET) != 0 || (changed & RTCM3_SET) != 0) {
- if (device->lexer.outbuflen > RTCM_MAX) {
+ if ((changed & RTCM2_SET) != 0
+ && device->lexer.outbuflen > RTCM_MAX) {
gpsd_log(&context.errout, LOG_ERROR,
"overlong RTCM packet (%zd bytes)\n",
device->lexer.outbuflen);
+ } else if ((changed & RTCM3_SET) != 0
+ && device->lexer.outbuflen > RTCM3_MAX) {
+ gpsd_log(&context.errout, LOG_ERROR,
+ "overlong RTCM3 packet (%zd bytes)\n",
+ device->lexer.outbuflen);
} else {
struct gps_device_t *dp;
for (dp = devices; dp < devices+MAX_DEVICES; dp++) {