-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 likes coverity #6269
Coverity likes coverity #6269
Conversation
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.
Thanks for your contribution to FRR!
Click for style suggestions
To apply these suggestions:
curl -s https://gist.githubusercontent.com/polychaeta/8b7780f344cd4012b6f07ad5e29ab6d4/raw/d8d685551d77df758faee1ecf93dfeaabaa13756/cr_6269_1587499485.diff | git apply
diff --git a/ospfd/ospf_api.c b/ospfd/ospf_api.c
index 83bf033ab..8b1cf0208 100644
--- a/ospfd/ospf_api.c
+++ b/ospfd/ospf_api.c
@@ -379,7 +379,8 @@ struct msg *msg_read(int fd)
/* Determine body length. */
bodylen = ntohs(hdr.msglen);
if (bodylen > (ssize_t)sizeof(buf)) {
- zlog_warn("msg_read: Body Length of message greater than what we can read");
+ zlog_warn(
+ "msg_read: Body Length of message greater than what we can read");
return NULL;
}
If you are a new contributor to FRR, please see our contributing guidelines.
Continuous Integration Result: SUCCESSFULContinuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11979/ This is a comment from an automated CI system. Warnings Generated during build:Checkout code: Successful with additional warnings
Warnings Generated during build:Debian 10 amd64 build: Successful with additional warningsDebian Package lintian failed for Debian 10 amd64 build:
CLANG Static Analyzer Summary
4 Static Analyzer issues remaining.See details at |
Outdated results 💚Basic BGPD CI results: SUCCESS, 0 tests failed
For details, please contact louberger |
There are a couple of switch statements in netlink_route_info_encode in zebra_fpm_netlink.c that had logically dead code. We have a switch statement let's take actual advantage of it instead of doing gyrations to what we want. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
It's possible(but unlikely) that a read of data from the network will give us bogus data. Don't automatically just trust the data size from the network and limit the read to the size of the buffer we have in play. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
06cd19e
to
e1c511c
Compare
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.
Thanks for your contribution to FRR!
Click for style suggestions
To apply these suggestions:
curl -s https://gist.githubusercontent.com/polychaeta/1220189a7f71888bea2d15ee626c4bc4/raw/a6191c421085c8974ae82be294c4f7e8d21a8e3f/cr_6269_1587555102.diff | git apply
diff --git a/ospfd/ospf_api.c b/ospfd/ospf_api.c
index 7e7236a3b..e33a37777 100644
--- a/ospfd/ospf_api.c
+++ b/ospfd/ospf_api.c
@@ -379,8 +379,9 @@ struct msg *msg_read(int fd)
/* Determine body length. */
bodylen = ntohs(hdr.msglen);
if (bodylen > (ssize_t)sizeof(buf)) {
- zlog_warn("%s: Body Length of message greater than what we can read",
- __func__);
+ zlog_warn(
+ "%s: Body Length of message greater than what we can read",
+ __func__);
return NULL;
}
If you are a new contributor to FRR, please see our contributing guidelines.
💚 Basic BGPD CI results: SUCCESS, 0 tests failedResults table
For details, please contact louberger |
Continuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-11985/ This is a comment from an automated CI system. Warnings Generated during build:Debian 10 amd64 build: Successful with additional warningsDebian Package lintian failed for Debian 10 amd64 build:
|
couple more issues found by coverity