Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buffer Overflow at BinLogPosition #84

Closed
MacRaeMac opened this issue Apr 23, 2021 · 2 comments
Closed

Buffer Overflow at BinLogPosition #84

MacRaeMac opened this issue Apr 23, 2021 · 2 comments
Assignees

Comments

@MacRaeMac
Copy link

MacRaeMac commented Apr 23, 2021

Please provide the following details.

  • Operating System:
  • PHP Version: < 7.0 >
  • php-mysql-replication Version: <1.0.0>
  • *mysql version (SELECT VERSION();): <10 Maria >

Steps required to reproduce the problem.

  1. Run the replication normally, let say using resume example
  2. binLogPosition exceed number 2147483647
  3. php-replication keep crashing due the int data type could not hold the binlog position number

Expected Result.

  • should be running without problem

Actual Result.

  • buffer overflow
@krowinski krowinski self-assigned this Aug 17, 2021
@krowinski
Copy link
Owner

Do you run php in 32bit system ?

can you run php -r 'echo PHP_INT_MAX;' ?

PHP_INT_MAX (int)
The largest integer supported in this build of PHP. Usually int(2147483647) in 32 bit systems and int(9223372036854775807) in 64 bit systems.

If this is still is not a problemI will need to change setBinLogPosition from int to string. But I know where to look.

@krowinski krowinski mentioned this issue Jan 29, 2024
@krowinski
Copy link
Owner

changed to string to handle 2^64 ints in bin log positions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants