Search code examples
javaalgorithmbufferbuffer-overflow

What does a buffer overflow in Java look like?


I have seen buffer overflows in other programming languages, but how does it look in Java?


Solution

  • Does Java have buffer overflows?

    The above answer explains why it is not common in java to actually trigger a buffer overflow. If you get one, the error is usually not in your code, unless you program with a native interface.

    I guess (speculation here) that it then depends on the native interface what a possible exception might look like, or wether the exception is handled at all, or the JVM will just crash with a system level exception.