From 2134fd0ae38967b4b9140c6052a4049e2c6b3059 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 25 Jul 2015 15:10:16 -0700 Subject: [PATCH] time_rz: fix off-by-one typo * lib/time_rz.c (extend_abbrs): Fix off-by-one typo. --- ChangeLog | 5 +++++ lib/time_rz.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0b0fc02ae9..e2b368db47 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-07-25 Paul Eggert + + time_rz: fix off-by-one typo + * lib/time_rz.c (extend_abbrs): Fix off-by-one typo. + 2015-07-23 Paul Eggert fprintftime, strftime: use timezone_t args diff --git a/lib/time_rz.c b/lib/time_rz.c index db1a382af6..19aaa1aedd 100644 --- a/lib/time_rz.c +++ b/lib/time_rz.c @@ -109,7 +109,7 @@ static void extend_abbrs (char *abbrs, char const *abbr, size_t abbr_size) { memcpy (abbrs, abbr, abbr_size); - abbrs[abbr_size + 1] = '\0'; + abbrs[abbr_size] = '\0'; } /* Return a newly allocated time zone for NAME, or NULL on failure. -- 2.39.5