[PATCH 4.9 077/207] lib/xz: Validate the value before assigning it to an enum variable