We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3f2166f commit e8a3335Copy full SHA for e8a3335
src/FontLib/BinaryStream.php
@@ -274,8 +274,11 @@ public function writeFixed($data) {
274
public function readLongDateTime() {
275
$this->readUInt32(); // ignored
276
$date = $this->readUInt32() - 2082844800;
277
+
278
+ # PHP_INT_MIN isn't defined in PHP < 7.0
279
+ $php_int_min = defined("PHP_INT_MIN") ? PHP_INT_MIN : ~PHP_INT_MAX;
280
- if (is_string($date) || $date > PHP_INT_MAX || $date < PHP_INT_MIN) {
281
+ if (is_string($date) || $date > PHP_INT_MAX || $date < $php_int_min) {
282
$date = 0;
283
}
284
0 commit comments