This looks fine to me. If you end up needing to re-work this patch series, I think it would be appropriate to combine this with patch #4 since this is essentially fixing the same possible NULL pointer.
On Sat, Oct 28, 2017 at 12:38 PM William Tu <[email protected]> wrote: > Clang reports possible null pointer 'argv[0]' to execvp. > Fix it by adding ovs_assert check. > > Signed-off-by: William Tu <[email protected]> > Acked-by: Mark Michelson <[email protected]> > --- > lib/process.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/lib/process.c b/lib/process.c > index 254052f2c27d..0b8f994f9b75 100644 > --- a/lib/process.c > +++ b/lib/process.c > @@ -275,6 +275,7 @@ process_start(char **argv, struct process **pp) > close(fd); > } > xpthread_sigmask(SIG_SETMASK, &prev_mask, NULL); > + ovs_assert(argv[0]); > execvp(argv[0], argv); > fprintf(stderr, "execvp(\"%s\") failed: %s\n", > argv[0], ovs_strerror(errno)); > -- > 2.7.4 > > _______________________________________________ > dev mailing list > [email protected] > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
