Skip to content

0-length FixedLengthArray of U8 decodes to [] #137

@kkowalski-reef

Description

@kkowalski-reef

def process(self):
if self.element_count:
if self.runtime_config.get_decoder_class(self.sub_type) is U8:
self.value_object = self.get_next_bytes(self.element_count)
return '0x{}'.format(self.value_object.hex())
else:
result = []
for idx in range(self.element_count):
result.append(self.process_type(self.sub_type).value)
else:
result = []
return result

All other U8 lengths decode to 0x...

Getting an array out of this is very surprising if not outright incorrect

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