libipt, ild: refactor length check in imm_dec()
libipt, ild: refactor length check in imm_dec()

Check the length at the beginning and return on failure.  This is to prepare
for indicating errors in the return value.

Change-Id: I5141c13037d20d238f1e33b7899840ab103b15ea
Signed-off-by: Markus Metzger <5f675b2b36595f90898e014b548ff7d9bbff2ab7@intel.com>

01org/processor-trace,01org/processor-trace,01org/processor-trace