bk: 5f83f1490vivQEe-HCDrdNY90_JBIw
+---
+* [Bug 3691] Buffer Overflow reading GPSD output
+ - original patch by matt<ntpbr@mattcorallo.com>
+ - increased max PDU size to 4k to avoid truncation
+
---
(4.2.8p15) 2020/06/23 Released by Harlan Stenn <stenn@ntp.org>
#define REFID "GPSD" /* reference id */
#define DESCRIPTION "GPSD JSON client clock" /* who we are */
-#define MAX_PDU_LEN 1600
+#define MAX_PDU_LEN 4096
#define TICKOVER_LOW 10
#define TICKOVER_HIGH 120
#define LOGTHROTTLE 3600
esrc = psrc + rbufp->recv_length;
pdst = up->buffer + up->buflen;
- edst = pdst + sizeof(up->buffer) - 1; /* for trailing NUL */
+ edst = up->buffer + sizeof(up->buffer) - 1; /* for trailing NUL */
while (psrc != esrc) {
ch = *psrc++;