[PATCH 4.14 093/251] lib/xz: Validate the value before assigning it to an enum variable