[PATCH 4.19 111/323] lib/xz: Validate the value before assigning it to an enum variable