Skip to content

Fix handling of null-terminated callsigns#8

Open
franga2000 wants to merge 1 commit intomfncooper:mainfrom
franga2000:main
Open

Fix handling of null-terminated callsigns#8
franga2000 wants to merge 1 commit intomfncooper:mainfrom
franga2000:main

Conversation

@franga2000
Copy link
Copy Markdown

As per the docs (see also the linked footnote), CallFrom and CallTo are null-terminated strings which may contain garbage after the null byte.

When testing with Packet Engine Pro (basically just fancy AGWPE), I got random text following the callsigns (e.g. CALL\x00ABCDE). Splitting on null instead of just stripping it is the correct fix.

My guess is that whatever generator of AGWPE data you were testing with always starts with a nulled buffer, but this isn't the case for PE Pro or indeed guaranteed in the spec, which is why this worked for you.

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