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

digest: fix type of len passed to aprintf %*s #7326

Closed
wants to merge 4 commits into from
Closed

Conversation

@bagder
Copy link
Member

@bagder bagder commented Jun 30, 2021

... it needs to be 'int'. Detected by Coverity CID 1486611.

... it needs to be 'int'. Detected by Coverity CID 1486611.
@bagder bagder added the tidy-up label Jun 30, 2021
Copy link
Member

@danielgustafsson danielgustafsson left a comment

Doesn't this risk overflow warnings on some platforms?

@bagder
Copy link
Member Author

@bagder bagder commented Jun 30, 2021

Doesn't this risk overflow warnings on some platforms?

I'm inclined to say "apparently not" (😁) since all CI builds went fine. The only problem could be if the length really is larger than 31 bits since then the typecast will lose bits. But these cases should never have that large of a length, and since the printf() code itself only yanks out an int already since before it has not been an issue before either.

@bagder bagder closed this in 78fc652 Jun 30, 2021
@bagder bagder deleted the bagder/digest-aprintf branch Jun 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants