Marking start and end of functions for CRC checks
Posted on 2002-05-30
Firstly, I writing in C for a Dos platform. This is using the Microsoft C compliers.
I have an issue with security on a certain piece of code in our software. It is a standard piece of code and I need to be able to perform a CRC on it to ensure that it hasn't been tampered with or an incorrect exe verion put on the computer. My problem is that the code around this may change (bug fixes, s/w additions, etc.) so I need to be able to check this particular part of the exe to ensure it hasn't changed.
The second option is to isolate the function into an exe of it's own, but this is a last resort because of the way the function works with the rest of the code. Changing it to be an independant exe will cause other more awkward security issues that will have to be dealt with.
The 2nd option I know how to do -> so I do not need advice with it. I need ideas on my first point. How do I mark the entry and exit points of a function so that a particular code section can be CRC checked?