Pointer analysis for programs with structures and castingProtecting C Programs from Attacks via Invalid Pointer Dereferences