Skip to content

ext/gmp: Fix GMP operator RHS overflow for GMP values#22656

Open
LamentXU123 wants to merge 1 commit into
php:masterfrom
LamentXU123:gmp-overflow-1
Open

ext/gmp: Fix GMP operator RHS overflow for GMP values#22656
LamentXU123 wants to merge 1 commit into
php:masterfrom
LamentXU123:gmp-overflow-1

Conversation

@LamentXU123

Copy link
Copy Markdown
Member
<?php
$too_large = gmp_init("18446744073709551616");

var_dump(gmp_init(2) ** $too_large);
var_dump(gmp_init(2) << $too_large);
object(GMP)#3 (1) {
  ["num"]=>
  string(1) "1"
}
object(GMP)#2 (1) {
  ["num"]=>
  string(1) "2"
}

This is a follow-up of #21945 that we should reject large RHS gmp number objects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant