Re: Validating a Function Address



"Thorsten Albers" <albersRE@xxxxxxxxxxxxxxxxxxx> wrote in message
news:01c71def$9270be40$314bf8d9@xxxxxxxxxxx
You can't go too far with security checks.

Really?

AFAIK only VC 6.0 has some
compiler switches by which some security checks are added. IMHO the good
performance of non-.NET applications mainly is based on a complete lack of
any security checkings. If these apps would implement the security checks
necessary they would be much slower - like .NET apps.

That's not necessarily a good thing.

No, not in any case. What e.g. about a pointer to a function in a PlugIn
DLL? If the code pointed to isn't available any longer this doesn't mean
that the app can't run any longer.

The side effect in this case would be the plugin would no longer run.

I can't see how this can be an argument against always checking the
pointers as far as possible.

If you check the pointer then you need to be prepared to do the extra work
required to ensure it fails gracefully. That could be a fair amount of work.
If you're not prepared (or not budgeted) to do this work then it IS a valid
arguement against this check. It's fairly unlikely that if the pointer is
wrong that IsBadCodePointer will pick it up anyway, so you're doing a lot of
extra work to exit gracefully from an unlikely error. This is on top of the
fact that it's unlikely to get a bad pointer anyway.

Michael


.



Relevant Pages


Loading