Right now pe.export_details[].offset is set to -1 whenever invalid offset is found. However in YARA invalid values are set to UNDEFINED since operations on UNDEFINED values are always false so you do not have to be that defensive while writing YARA rules as those values are left out. Therefore I suggest to change this value to UNDEFINED also to preserve consistency.
I have also submitted simple regression test with sample to check for invalid offset values and their return value to match YR_UNDEFINED instead of -1 as previously.
Right now
pe.export_details[].offset
is set to -1 whenever invalid offset is found. However in YARA invalid values are set to UNDEFINED since operations on UNDEFINED values are always false so you do not have to be that defensive while writing YARA rules as those values are left out. Therefore I suggest to change this value to UNDEFINED also to preserve consistency. I have also submitted simple regression test with sample to check for invalid offset values and their return value to match YR_UNDEFINED instead of -1 as previously.