about summary refs log tree commit diff
path: root/time/tzfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'time/tzfile.c')
-rw-r--r--time/tzfile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/time/tzfile.c b/time/tzfile.c
index 46d4fc71ae..57abbb8c14 100644
--- a/time/tzfile.c
+++ b/time/tzfile.c
@@ -270,7 +270,8 @@ __tzfile_read (const char *file, size_t extra, char **extrap)
       if (__glibc_unlikely (tzspec_len == 0 || tzspec_len - 1 < num_isgmt))
 	goto lose;
       tzspec_len -= num_isgmt + 1;
-      if (__glibc_unlikely (SIZE_MAX - total_size < tzspec_len))
+      if (__glibc_unlikely (tzspec_len == 0
+			    || SIZE_MAX - total_size < tzspec_len))
 	goto lose;
     }
   if (__glibc_unlikely (SIZE_MAX - total_size - tzspec_len < extra))