summaryrefslogtreecommitdiff
path: root/gpsmon.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2018-07-26 12:43:05 -0700
committerGary E. Miller <gem@rellim.com>2018-07-26 12:43:05 -0700
commit75f90d6aa743cec68afa545ad1d5bcb539a79d93 (patch)
tree63870917db05626b0f9f5f732b0f561bf9cd0e08 /gpsmon.c
parent65e53d4495ee72288e5563522ea509da8bec5073 (diff)
downloadgpsd-75f90d6aa743cec68afa545ad1d5bcb539a79d93.tar.gz
gpsmon: Expand a too small buffer.
Bug found by gcc 7.3.0.
Diffstat (limited to 'gpsmon.c')
-rw-r--r--gpsmon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gpsmon.c b/gpsmon.c
index 8bf50d4f..43d1ab61 100644
--- a/gpsmon.c
+++ b/gpsmon.c
@@ -425,7 +425,7 @@ void monitor_log(const char *fmt, ...)
static const char *promptgen(void)
{
- static char buf[sizeof(session.gpsdata.dev.path)];
+ static char buf[sizeof(session.gpsdata.dev.path) + HOST_NAME_MAX + 20];
if (serial)
(void)snprintf(buf, sizeof(buf),