aboutsummaryrefslogtreecommitdiffstats
path: root/env.c
diff options
context:
space:
mode:
Diffstat (limited to 'env.c')
-rw-r--r--env.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/env.c b/env.c
index d832811d..516040bd 100644
--- a/env.c
+++ b/env.c
@@ -190,7 +190,8 @@ static char *tzoffset(time_t *now)
}
if (off >= 24 * 60) /* should be impossible */
off = 23 * 60 + 59; /* if not, insert silly value */
- sprintf(offset_string, "%c%02d%02d", sign, off / 60, off % 60);
+ snprintf(offset_string, sizeof(offset_string),
+ "%c%02d%02d", sign, off / 60, off % 60);
return (offset_string);
}