intel / intel/openlldp

Incorrect TLV value being evaluated

Open
#109 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
58
Forks
53
PR merge metrics
No merged PRs in 30d

Description

It looks like an incorrect check is being done for the TLV type in the `ecp_rx_ProcessFrame()` function in qbg/ecp.c. Right after a new, unpacked TLV is created, a check is done on the decoded `tlv_length` value and the `tlv->type` from the, currently blank, unpacked TLV structure. This should be `tlv_type` from the recently decoded structure above.

I am just documenting this as it was caught while reviewing PR #104, but it is a pre-existing issue. It should be a quick fix once I have time.

"I'm seeing other issues in this function besides memory leaks. I'll probably create a PR for it once I've had more time to review it. In any case, I would combine this free with a `tlv = NULL;` for safety."

_Originally posted by @penguin359 in https://github.com/intel/openlldp/pull/104#discussion_r1667283223_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.