|
thistimei = range32.base; |
|
thistimecnt = range32.count; |
|
toomanytimes = thistimecnt >> 31 >> 1 != 0; |
|
thisleapi = range32.leapbase; |
|
thisleapcnt = range32.leapcount; |
|
locut = PG_INT32_MIN < lo_time; |
|
hicut = hi_time < PG_INT32_MAX; |
|
} |
|
else |
|
{ |
|
thisdefaulttype = range64.defaulttype; |
|
thistimei = range64.base; |
|
thistimecnt = range64.count; |
|
toomanytimes = thistimecnt >> 31 >> 31 >> 2 != 0; |
|
thisleapi = range64.leapbase; |
|
thisleapcnt = range64.leapcount; |
|
locut = min_time < lo_time; |
|
hicut = hi_time < max_time; |
|
} |
I found potential incorrectness in the line 2291. According to the logic of further operations, thistimecnt is written to a 32-bit memory area, which means that this check does not consider values from 2^32 to (2^64) - 1.
PolarDB-for-PostgreSQL/src/timezone/zic.c
Lines 2278 to 2296 in accf02e
I found potential incorrectness in the line 2291. According to the logic of further operations, thistimecnt is written to a 32-bit memory area, which means that this check does not consider values from 2^32 to (2^64) - 1.