Merge pull request #7603 from donaldsharp/ospf_crash_fix

ospfd: Prevent crash by accessing memory not owned.
This commit is contained in:
Donatas Abraitis 2020-11-26 14:53:18 +02:00 committed by GitHub
commit 4cfb2ae8c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -416,7 +416,7 @@ static void *route_set_metric_compile(const char *arg)
{
struct ospf_metric *metric;
metric = XCALLOC(MTYPE_ROUTE_MAP_COMPILED, sizeof(uint32_t));
metric = XCALLOC(MTYPE_ROUTE_MAP_COMPILED, sizeof(*metric));
metric->used = false;
if (all_digit(arg))