diff options
author | Gary E. Miller <gem@rellim.com> | 2016-04-06 13:59:17 -0700 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2016-04-06 13:59:17 -0700 |
commit | dfebe3fac76ebb27c39d6cb0a623b3b24ed95572 (patch) | |
tree | 74bc3f460f2fd0307f39d5092ec46d8a1e3c3d0f /gpsd.c | |
parent | c2cdd535f7c6791c378b9c889842a0b38bacb133 (diff) | |
download | gpsd-dfebe3fac76ebb27c39d6cb0a623b3b24ed95572.tar.gz |
RTCM3 packets can be bigger than RTCM2 ones.
I have seen up to about 490 in RTCM3.
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++) { |