eclipse-ee4j / eclipse-ee4j/orb
possible integer overflow in ByteBufferPoolImpl.reAllocate
Open
- Dominant language
- Java
- Stars
- 30
- Forks
- 28
- Avg merge
- 3h 43m
- Merged PRs (30d)
- 9
Description
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 ...
Contributor guide
Assessment
This issue has not been assessed yet.