diff options
Diffstat (limited to 'gpsd.c')
-rw-r--r-- | gpsd.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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++) { |