xref: /PHP-8.3/ext/gmp/tests/gh16411.phpt (revision ab595c07)
1--TEST--
2GH-16411 (gmp_export() can cause overflow)
3--EXTENSIONS--
4gmp
5--FILE--
6<?php
7gmp_export("-9223372036854775808", PHP_INT_MAX, PHP_INT_MIN);
8?>
9--EXPECTF--
10Fatal error: Uncaught ValueError: gmp_export(): Argument #2 ($word_size) is too large for argument #1 ($num) in %s:%d
11%A
12