question about tzload's buffer size
Paul Eggert
eggert at CS.UCLA.EDU
Fri Feb 24 21:31:24 UTC 2006
In this code:
union {
struct tzhead tzhead;
char buf[2 * sizeof(struct tzhead) +
2 * sizeof *sp +
4 * TZ_MAX_TIMES];
} u;
it's not clear to me that the buffer is large enough. For example,
aren't there two copies of the leap second transitions, and isn't the
second copy bigger, so shouldn't TZ_MAX_LEAPS be involved? And is
there guaranteed to be room for the POSIX TZ string?
Perhaps a comment is in order, at any rate?
More information about the tz
mailing list