[PATCH 5.4 155/355] lib/xz: Validate the value before assigning it to an enum variable