bgpd: fix some coverity scan issues#1554
Conversation
This is a possible buffer overflow. We should always use the buffer size (whenever possible) to tell functions what the size of the buffer is, instead of a hardcoded value. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Handle the return value of argv_find_and_parse_afi() to avoid passing along bad values. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
|
Once CI finishes I will push in. |
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-2179/ This is a comment from an EXPERIMENTAL automated CI system. Warnings Generated during build:Ubuntu1404 amd64 build: Successful with additional warnings:Debian Package lintian failed for Ubuntu1404 amd64 build: Debian8 amd64 build: Successful with additional warnings:Debian Package lintian failed for Debian8 amd64 build: CLANG Static Analyzer Summary
23 Static Analyzer issues remaining.See details at |
💚 Basic BGPD CI results: SUCCESS, 0 tests failedResults table
For details, please contact louberger |
This PR fix 2 issues pointed out by the coverity scan:
prefix_rd2str()slip up: use size of buffer instead of hardcoded valueargv_find_and_parse_afi()return value before proceeding