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

possible integer overflow in ByteBufferPoolImpl.reAllocate #60

Open
avl42 opened this issue May 3, 2019 · 0 comments
Open

possible integer overflow in ByteBufferPoolImpl.reAllocate #60

avl42 opened this issue May 3, 2019 · 0 comments

Comments

@avl42
Copy link

avl42 commented May 3, 2019

orbmain/src/main/java/com/sun/corba/ee/impl/transport/ByteBufferPoolImpl.java

The "while"-loop near start of ByteBufferPoolImpl.reAllocate() doubling the size until it is large enough may turn into an infinite loop, if the minimumSize parameter is ever more than 1 GB. Probably not the most common situation, but if it ever happened, then going into a tight busy loop surely isn't what anyone would want.

Not sure, how to best solve it, though. Maybe also check for size < 0, or use a long-typed helper variable just within the loop ...

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

1 participant