Hacker News new | past | comments | ask | show | jobs | submit login

If you have a byte array on a 32bit machine, assuming your program's text (i.e. instructions) takes up some space, the biggest possible array will be less than 2^32 Bytes = 4GiB, so the midpoint will be too. There can be no overflow.

If you subtracted two 64bit pointers and stored the result in an int32 though, then you would have problems.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: