[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v7 12/19] tools: add simple vchan-socket-proxy
On Thu, May 21, 2020 at 7:09 AM Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote: > > On 19/05/2020 02:54, Jason Andryuk wrote: > > +static int connect_socket(const char *path_or_fd) { > > + int fd; > > + char *endptr; > > + struct sockaddr_un addr; > > + > > + fd = strtoll(path_or_fd, &endptr, 0); > > + if (*endptr == '\0') { > > + set_nonblocking(fd, 1); > > + return fd; > > + } > > + > > + fd = socket(AF_UNIX, SOCK_STREAM, 0); > > + if (fd == -1) > > + return -1; > > + > > + addr.sun_family = AF_UNIX; > > + strncpy(addr.sun_path, path_or_fd, sizeof(addr.sun_path)); > > Coverity has identified issues, some perhaps more concerning than others. Thanks. I'll take a look. -Jason
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |