This is a hypothetical question, but say, I have the following array:
Local test:int[10,10]
- What happens when a program doesn't properly check for the bounds of an array, and tries to write to test[12,12] , or test[-1,-2] for example?
- Will the invalid assignment just get ignored?
- Will it extend the size of the array to include these cells?
- Will random bits of RAM get overwritten by this information? (buffer overflow) ?
Obviously it is important to do proper bounds checking when writing data, but it would be good to know what the impact could be if something does happen to get... misplaced.
I looked around in the docs, but didn't see anything that would shed light on this.
Local test:int[10,10]
- What happens when a program doesn't properly check for the bounds of an array, and tries to write to test[12,12] , or test[-1,-2] for example?
- Will the invalid assignment just get ignored?
- Will it extend the size of the array to include these cells?
- Will random bits of RAM get overwritten by this information? (buffer overflow) ?
Obviously it is important to do proper bounds checking when writing data, but it would be good to know what the impact could be if something does happen to get... misplaced.
I looked around in the docs, but didn't see anything that would shed light on this.