Skip to content

Commit 0cabaf2

Browse files
committed
ext/calendar: Fix integer overflow in GregorianToSdn()
ext/calendar: Fix integer overflow in GregorianToSdn() ext/calendar: Fix integer overflow in GregorianToSdn()
1 parent 090a157 commit 0cabaf2

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

ext/calendar/gregor.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,14 +223,13 @@ zend_long GregorianToSdn(
223223
return (0);
224224
}
225225
}
226-
227226
/* Make year always a positive number. */
228227
if (inputYear < 0) {
229228
year = inputYear + 4801;
230229
} else {
231230
year = inputYear + 4800;
232231
}
233-
232+
234233
/* Adjust the start of the year. */
235234
if (inputMonth > 2) {
236235
month = inputMonth - 3;

0 commit comments

Comments
 (0)