Browse Source

fix printf format specification to print max len 4 for refid,

which may not be null terminated; ok henning@
OPENBSD_4_5
stevesk 16 years ago
parent
commit
4e2022dc16
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/usr.sbin/ntpd/sensors.c

+ 2
- 2
src/usr.sbin/ntpd/sensors.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: sensors.c,v 1.41 2009/01/26 21:45:11 naddy Exp $ */
/* $OpenBSD: sensors.c,v 1.42 2009/01/27 15:21:20 stevesk Exp $ */
/* /*
* Copyright (c) 2006 Henning Brauer <henning@openbsd.org> * Copyright (c) 2006 Henning Brauer <henning@openbsd.org>
@ -136,7 +136,7 @@ sensor_add(int sensordev, char *dxname)
TAILQ_INSERT_TAIL(&conf->ntp_sensors, s, entry); TAILQ_INSERT_TAIL(&conf->ntp_sensors, s, entry);
log_debug("sensor %s added (weight %d, correction %.6f, refstr %-4s)",
log_debug("sensor %s added (weight %d, correction %.6f, refstr %.4s)",
s->device, s->weight, s->correction / 1e6, &s->refid); s->device, s->weight, s->correction / 1e6, &s->refid);
} }


Loading…
Cancel
Save