It might pay to assert your pointer params.  Throughout.