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
Coverity 1515953: negative loop bound #19413
Conversation
You beat me to it.. it should not hit this in practice but it is better this way. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to beat it into my head that sk_num() can return -1..
Whether it should or not is a different matter.
Sadly, it can return -1 and is documented as doing so. It's idiotic IMO. sk_num(NULL) ought to return 0 since there are no elements. |
How about adding a new API |
Adding APIs is essentially a permanent commitment to maintaining them. OpenSSL has a very conservative policy about API changes. While I like the suggestion, I'm not sure the ongoing support is worth the pain. |
24 hours has passed since 'approval: done' was set, but as this PR has been updated in that time the label 'approval: ready to merge' is not being automatically set. Please review the updates and set the label manually. |
Merged. |
Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from #19413)
Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from openssl#19413) (cherry picked from commit 9ab57f2)
Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from openssl#19413)
No description provided.