[PATCH 5.10 223/575] lib/xz: Validate the value before assigning it to an enum variable