[PATCH 5.15 269/917] lib/xz: Validate the value before assigning it to an enum variable