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

Fix stringop-truncation warning in AX25 callsign getter #958

Merged
merged 4 commits into from
Feb 11, 2024

Conversation

remenyo
Copy link
Contributor

@remenyo remenyo commented Feb 8, 2024

stringop-truncation warning was caught by GCC12 in the callsign getter, as it copies 6 characters instead of 7.

I see in in the header file : RADIOLIB_AX25_MAX_CALLSIGN_LEN + 1 I guess +1 is for the null termination.

So I added +1 to the copy in the getter as well, as i guess it was the intent to terminate the resulting char array as well.


Note that I don't use this feature of the library, (-> I havent tested it) nor I know if this is the correct way to fix.

@jgromes jgromes merged commit e426776 into jgromes:master Feb 11, 2024
29 checks passed
@jgromes
Copy link
Owner

jgromes commented Feb 11, 2024

Thanks for pointing this out - I think I did see this warning at some point in CI runs but did not see it as a high priority. Merged, thank you for the contribution!

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