Skip to content

Commit 96993aa

Browse files
committed
tree data BUGFIX check negative invalid time shift
Fixes #2399
1 parent 55178bd commit 96993aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tree_data_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1724,7 +1724,7 @@ ly_time_str2time(const char *value, time_t *time, char **fractions_s)
17241724
} else {
17251725
value += i;
17261726
shift = strtol(value, &ptr, 10);
1727-
if (shift > 23) {
1727+
if ((shift > 23) || (shift < -23)) {
17281728
LOGERR(NULL, LY_EINVAL, "Invalid date-and-time timezone hour \"%" PRIi64 "\".", shift);
17291729
return LY_EINVAL;
17301730
} else if (ptr[0] != ':') {

0 commit comments

Comments
 (0)