Prevent stack overflow attack