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

Simplify convertChipType and fix truncation error. #67

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

flatmax
Copy link

@flatmax flatmax commented Mar 6, 2022

The error stopping compilations is format-truncation.

The error stopping compilations is format-truncation.
@obbardc
Copy link

obbardc commented Apr 4, 2022

Looks good to me!
FWIW we have pulled this patch into the newly-created package for Debian.

@orangecms
Copy link

Can't it happen that this reads beyond the buffer? There's #57 to make it safer.

@flatmax
Copy link
Author

flatmax commented May 1, 2022

It can't happen.
options.chip is a string of length MAX_LINE_LEN, see here.
getChipType calls convertChipType with the argument of a length >> 4 char, see here.

@orangecms
Copy link

Yes. That means that the caller has to ensure safety, while the function itself doesn't provide it. That's a lack of resiliece. :-)

martinSusz added a commit to martinSusz/rkdeveloptool that referenced this pull request Dec 2, 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.

3 participants