[ovs-dev] [PATCH 03/11] ovs-appctl: Fix possible null pointer argument.
Mark Michelson
mmichels at redhat.com
Mon Oct 30 14:36:21 UTC 2017
Looks good to me.
On Sat, Oct 28, 2017 at 12:34 PM William Tu <u9012063 at gmail.com> wrote:
> Clang reports possible optarg as null pointer passed to atoi.
> Fix it by adding ovs_assert check before.
>
> Signed-off-by: William Tu <u9012063 at gmail.com>
>
Acked-by: Mark Michelson <mmichels at redhat.com>
> ---
> utilities/ovs-appctl.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/utilities/ovs-appctl.c b/utilities/ovs-appctl.c
> index 8f87cc4f6c6e..cc1326bc9478 100644
> --- a/utilities/ovs-appctl.c
> +++ b/utilities/ovs-appctl.c
> @@ -165,6 +165,7 @@ parse_command_line(int argc, char *argv[])
> exit(EXIT_SUCCESS);
>
> case 'T':
> + ovs_assert(optarg);
> time_alarm(atoi(optarg));
> break;
>
> --
> 2.7.4
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
More information about the dev
mailing list