Merge pull request #2543 from pacovn/Coverity_1399304_Out-of-bounds_access

ospfd: out-of-bounds access (Coverity 1399304 1399286)
This commit is contained in:
Jafar Al-Gharaibeh 2018-06-25 12:38:44 -04:00 committed by GitHub
commit 433b146e25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8166,6 +8166,11 @@ DEFUN (ospf_redistribute_instance_source,
source = proto_redistnum(AFI_IP, argv[idx_ospf_table]->text);
if (source < 0) {
vty_out(vty, "Unknown instance redistribution\n");
return CMD_WARNING_CONFIG_FAILED;
}
instance = strtoul(argv[idx_number]->arg, NULL, 10);
if ((source == ZEBRA_ROUTE_OSPF) && !ospf->instance) {