mirror of
https://gitlab.gnome.org/GNOME/libxml2
synced 2025-03-28 21:33:13 +00:00
Fix unsigned int overflow
This commit is contained in:
parent
0df3c2c9aa
commit
b3a95d57f2
@ -3877,7 +3877,7 @@ _xmlSchemaDateAdd (xmlSchemaValPtr dt, xmlSchemaValPtr dur)
|
||||
|
||||
temp = r->mon + carry;
|
||||
r->mon = (unsigned int) MODULO_RANGE(temp, 1, 13);
|
||||
r->year = r->year + (unsigned int) FQUOTIENT_RANGE(temp, 1, 13);
|
||||
r->year = r->year + (long) FQUOTIENT_RANGE(temp, 1, 13);
|
||||
if (r->year == 0) {
|
||||
if (temp < 1)
|
||||
r->year--;
|
||||
|
Loading…
x
Reference in New Issue
Block a user