sum = 0; do { nread = read(0, addr, n-sum); if (nread != -1) sum += nread; } while (sum < n); As you may see, this implementation is weird because using read(0, addr, n-sum) instead of read(0, addr+sum, n-sum). Therefore, it is possible to do Partial Overwrite by splitting input into several. @wapiflapi, a great hacker in France shares the exploit using this method(http://hastebin.com/iyinepaxen.p