Skip to content

Commit

Permalink
odp-util: Fix abort while formatting nsh actions.
Browse files Browse the repository at this point in the history
OVS should not exit if it cannot format NSH actions for the user.
It should just report the error like the other formatting functions do.

Credit to OSS-Fuzz.

Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=21509
Fixes: 1fc11c5 ("Generic encap and decap support for NSH")
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Acked-by: Mark Gray <mark.d.gray@redhat.com>
  • Loading branch information
igsilya committed Jan 21, 2021
1 parent 50e5523 commit e7eb904
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/odp-util.c
Expand Up @@ -391,7 +391,8 @@ format_odp_push_nsh_action(struct ds *ds,
break;
}
default:
OVS_NOT_REACHED();
ds_put_cstr(ds, ",<error: unknown mdtype>");
break;
}
ds_put_format(ds, ")");
}
Expand Down

0 comments on commit e7eb904

Please sign in to comment.