I want to see example in code, with a good explanation. This example in the link is poor as it contradicts itself and was written by somebody who speaks English as a second language.
The author summarizes that he will be putting his text in an EXISTing section of nullbytes, not adding nullbytes. Then the code example adds nullbytes and leaves no explanation why this was done. Fuck.
Did you read the example?
I will undoubtedly offend somebody because I'm paying extreme attention to details. When the details are inconsistent, I lose trust in the source material.
In the example the executable is never being run, the patching program(a seperate entity) reads and writes to the original file.
Run-time(on-the-fly) patching implies that instructions are being executed, and that asm opcodes are being changed on-the-fly. In the linked example a file is being modified so that when it is run(eventually) you will see the code changes. This is not the same thing as run-time patching.
See where I'm going with this? I know there's more than one way to skin a cat, but I'm frustrated by the inconsistency of what is linked, and what is being said.