Skip to content

nul-terminate meinberg sw_rev and ascii_msg strings in data_mbg#30

Open
arib06 wants to merge 1 commit into
ntp-project:stablefrom
arib06:mbg-string-nul-terminate
Open

nul-terminate meinberg sw_rev and ascii_msg strings in data_mbg#30
arib06 wants to merge 1 commit into
ntp-project:stablefrom
arib06:mbg-string-nul-terminate

Conversation

@arib06

@arib06 arib06 commented Jul 10, 2026

Copy link
Copy Markdown

get_mbg_sw_rev and get_mbg_ascii_msg copy the full name[17]/s[23] field out of the serial packet, overwriting the byte the struct reserves as the trailing zero, so the later %s and strlen in refclock_parse read past the field on a non-terminated frame; force the last byte to NUL after each copy.

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.

1 participant