Skip to content

rx_filter needs to check size of data[] before parsing #174

@rmccourt

Description

@rmccourt

In interfaces/ipmb.py, the rx_filter function assumes that all the fields are present in the data array. If that's not the case, then the code crashes. I was able to fix it by adding a check at line 241 if len(data) < 7: return False

Not sure if it's unique to my setup, but the Aardvark I am using consistently seems to return just the address byte on the first iteration of the polling loop when looking for an IPMB response. Then the rx_filter code tries to index off the end of data[] and bombs out.

The real fix maybe needs more sophistication (or at least not just a magic number) - not totally sure. I guess I'm hoping that pointing this out will let somebody more knowledgeable drop in a real fix.

Thanks

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