Skip to content

VT parser rejects a pool that ends with an empty Data Mask or Working Set #950

Closed

Description

@franz-ms-muc

Problem

parse_next_object() checks iopLength >= tempObject->get_minumum_object_length() before it reads an object. For two object types, the minimum is larger than the fixed part the parser then reads:

Object Fixed part read by parse_next_object() MIN_OBJECT_LENGTH
Data Mask 8 bytes (ID, type, background colour, Soft Key Mask, number of objects, number of macros); it then does iopLength -= 8 12
Working Set 10 bytes (ID, type, background colour, selectable, active mask, number of objects, number of macros, number of languages); it then does iopLength -= 10 16

So a Data Mask without objects and macros is 8 bytes long. If it is the last object of a transfer, fewer bytes than the minimum are left, and the whole pool is rejected with the Data Mask as the faulting object, although it is valid. In the middle of a pool it goes unnoticed, because the following objects make up the difference.

Edit: for the Working Set this only matters for a Working Set without objects, which isn't valid (ISO 11783-6:2018 B.1 and Table B.2 require at least one object). A valid Working Set is at least 16 bytes, so only the Data Mask is affected in practice. The Working Set guard should still match the 10 bytes the parser reads.

To reproduce

Parse { 0x00, 0x00, 0x00, 0x00, 0x01, 0xE8, 0x03, 0x00, 0x00, 0x00, 0xE8, 0x03, 0x01, 0x00, 0xFF, 0xFF, 0x00, 0x00 } (Working Set 0 with active mask 1000, then an empty Data Mask 1000): parsing fails with faulting object 1000. (The Working Set in this pool has no objects, which isn't valid; with one object it fails the same way because of the Data Mask.)

StatusMessageReportsTheNewAddressOfTheActiveWorkingSetMaster (from #936) uploads exactly the first pool. It only passes today because a failed parse leaves the objects parsed so far in the tree; #949 changes that.

Fix

Set DataMask::MIN_OBJECT_LENGTH to 8 and WorkingSet::MIN_OBJECT_LENGTH to 10. Both values come from the first version of the object classes. The other object types match the fixed part their parser reads.

Activity

  1. added a commit that references this issue on Nov 18, 2026
    b151fc1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions