summaryrefslogtreecommitdiffstats
path: root/libntp/uglydate.c
diff options
context:
space:
mode:
Diffstat (limited to 'libntp/uglydate.c')
-rw-r--r--libntp/uglydate.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libntp/uglydate.c b/libntp/uglydate.c
index 676a5fd..b2da9c0 100644
--- a/libntp/uglydate.c
+++ b/libntp/uglydate.c
@@ -41,8 +41,10 @@ uglydate(
while (year >= 100)
year -= 100;
}
- (void) sprintf(bp, "%17s %02d:%03d:%02d:%02d:%02d.%03ld",
- timep, year, tm->tm_yday, tm->tm_hour, tm->tm_min,
- tm->tm_sec, msec);
+ snprintf(bp, LIB_BUFLENGTH,
+ "%17s %02d:%03d:%02d:%02d:%02d.%03ld", timep, year,
+ tm->tm_yday, tm->tm_hour, tm->tm_min, tm->tm_sec,
+ msec);
+
return bp;
}
OpenPOWER on IntegriCloud