[openEuler-5.10 213/557] lib/xz: Validate the value before assigning it to an enum variable