I'm not sure what relation between goto and security vulnerabilities you
are thinking of. As for the labels you are going to, yes, when you
write the code you will have to make sure you are jumping to the right
place to do the proper cleanup that is required at that point in the
code. Figuring out which label you need to jump to though, is MUCH
easier than figuring out all of the ( possibly dozens ) of lines of
cleanup code you need to duplicate when you add a new operation and
error check/recovery.
Nate DeSimone wrote:
Ok, yes I agree that lacking SEH, gotos definately are more elegant
solution than a bunch of nested if statements. However thinking forward
a little bit, I recall that the use of gotos in your code can introduce
security vunerabilities and that you have to be very careful whenever
you use a goto, since we want ReactOS to be a mainstream OS we better do
a better job with security than MS. So may I recommend that the final
error handling boilerplate be double checked so that you can't get it to
jump to anouther address in memory than the intended address.