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

Verify cast to int in V13Database.getTransactionIdBuffer #734

Closed
mrotteveel opened this issue Feb 16, 2023 · 1 comment
Closed

Verify cast to int in V13Database.getTransactionIdBuffer #734

mrotteveel opened this issue Feb 16, 2023 · 1 comment

Comments

@mrotteveel
Copy link
Member

The cast to int in V13Database.getTransactionIdBuffer is suspicious, it probably shouldn't be there. Also consider using a different method for encoding to remove the overhead of allocating a ByteArrayOutputStream and an extra byte array.

@mrotteveel
Copy link
Member Author

Essentially, reconnect transaction on Firebird 3.0 and higher did not work for transaction ids exceeding 0x7FFF_FFFF (for JNA it probably did work, although I revised a range check there as well). For Jaybird 6, I also cleaned up the code and used the same code path for all AbstractFbDatabase sub-classes.

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