Cannibalism should be considered immoral and wrong in most cases. You should do everything you can to avoid eating humans, but if you have no other choice for survival than by all means eat away. Is it better to die and be morally right? We as humans have a natural survival instinct so we must do what is necessary to live.
While I am not sure if killing a member of the party is permissible assuming a death occurs, yes, cannibalism is permissible in my opinion. The calorie content may keep the party alive until rescue. It's better to have a closed casket funeral for the fallen and several survivors than several victims and no survivors.
Cannibalism can be permissible, if that is your only option for survival. If your companion is dead, and the only way to avoid starvation yourself is cannibalism, then you have to do what you have to do. It seems impossible to imagine being in that situation, but if it happened, I think most people would do anything to survive.
Cannibalism is wrong and should never be done. It does not matter what type of situation there is, eating other people is wrong. There is no way to justify eating another human. There's millions of way to find food or resources on this Earth. If you eat someone you should go to prison in my opinion.