time_rz: fix off-by-one typo
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 25 Jul 2015 22:10:16 +0000 (15:10 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 26 Jul 2015 01:17:44 +0000 (18:17 -0700)
* lib/time_rz.c (extend_abbrs): Fix off-by-one typo.

ChangeLog
lib/time_rz.c

index 0b0fc02ae98504b27918d50f37363d8db8c29f4b..e2b368db472d6e2bc9c0292e676df7f4f755f127 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-07-25  Paul Eggert  <eggert@cs.ucla.edu>
+
+       time_rz: fix off-by-one typo
+       * lib/time_rz.c (extend_abbrs): Fix off-by-one typo.
+
 2015-07-23  Paul Eggert  <eggert@cs.ucla.edu>
 
        fprintftime, strftime: use timezone_t args
index db1a382af618947ce2eda214a338c67319101576..19aaa1aedde25d078656c6f39312502715e27737 100644 (file)
@@ -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.