More gracefully break out of parse_notify on a corrupted hex string error, checking the return value of all hex2bin conversions and being consistent with using stack memory. Fix an unlocking error in cases of failure.