New Defects reported by Coverity Scan for freerangerouting/frr
scan-admin at coverity.com
scan-admin at coverity.com
Tue Jan 19 12:59:56 UTC 2021
Hi,
Please find the latest report on new defect(s) introduced to freerangerouting/frr found with Coverity Scan.
2 new defect(s) introduced to freerangerouting/frr found with Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 2 of 2 defect(s)
** CID 1500944: Error handling issues (CHECKED_RETURN)
/lib/command.c: 2316 in script()
________________________________________________________________________________________________________
*** CID 1500944: Error handling issues (CHECKED_RETURN)
/lib/command.c: 2316 in script()
2310 script_cmd,
2311 "script SCRIPT",
2312 "Test command - execute a script\n"
2313 "Script name (same as filename in /etc/frr/scripts/\n")
2314 {
2315 struct prefix p;
>>> CID 1500944: Error handling issues (CHECKED_RETURN)
>>> Calling "str2prefix" without checking return value (as is done elsewhere 61 out of 63 times).
2316 str2prefix("1.2.3.4/24", &p);
2317
2318 struct frrscript *fs = frrscript_load(argv[1]->arg, NULL);
2319
2320 if (fs == NULL) {
2321 vty_out(vty, "Script '/etc/frr/scripts/%s.lua' not found\n",
** CID 1500943: Error handling issues (CHECKED_RETURN)
/lib/frrlua.c: 79 in lua_toprefix()
________________________________________________________________________________________________________
*** CID 1500943: Error handling issues (CHECKED_RETURN)
/lib/frrlua.c: 79 in lua_toprefix()
73
74 void *lua_toprefix(lua_State *L, int idx)
75 {
76 struct prefix *p = XCALLOC(MTYPE_TMP, sizeof(struct prefix));
77
78 lua_getfield(L, idx, "network");
>>> CID 1500943: Error handling issues (CHECKED_RETURN)
>>> Calling "str2prefix" without checking return value (as is done elsewhere 61 out of 63 times).
79 str2prefix(lua_tostring(L, -1), p);
80 lua_pop(L, 1);
81
82 return p;
83 }
84
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50yrtN2DGUU98GYhjd55wXsXtw53zRK70R0agdV-2Fb7c45-2BkxBoZjryQtr5SpUD80NNfE-3DI0IG_O0IDF7c8sUs2B6kWTeWwAJZqriD5fgsfL8PAN30oQTyMh29Do2sjr-2FoQFgCSHKwZPXSpTD-2Fyw5QUWvEiMGxIdANhb2zV-2BQCB2nJkIirqASzYsFl6iy8vCb9MI7r3AyBWJRpJjt7mnOy9X8Beb4xQ2wgvzxM-2BWVCVV36fTfjkqOFVChCSJvYG7QH928a5gwS7KD2iqEVcJ9sY3NLdbw82-2FdgB-2Bu3D3aGC9pZTaJ-2BAoT4-3D
More information about the dev
mailing list