Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dlt_daemon_client: Fix Control Msg ECUId comparison with active Gateway #414

Merged
merged 1 commit into from
Oct 13, 2022

Conversation

andreirusu96
Copy link
Contributor

Fixes wrong strcmp() usage with non-NULL terminated extra.ecu.

Signed-off-by: Andrei-Mircea Rusu [email protected]

@andreirusu96
Copy link
Contributor Author

Without the fix, in case of all 4 bytes of extra.ecu being used, and no 0 byte present in extra.seid (next variable in DltStandardHeaderExtra struct), corruption will take place and the processed control msg will be lost:

(additional log added for debugging by me)
[ 855.558504]~DLT~16910~INFO ~dlt_daemon_client_process_control: Will compare evalue: [ECU1] with [ECU1������] Seid: 4294967295 [ 855.558507]~DLT~16910~WARNING ~Unknown passive node identifier

@michael-methner
Copy link
Collaborator

Thanks for the patch. Looks good to me.

@michael-methner michael-methner merged commit 0f969a9 into COVESA:master Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants