added an assert

ensure the length passed to memset is larger than 0