[mw-devel] [Git][arthur/mw][master] 2 commits: Address sanitizer fixups
Justin Mitchell
arthur at sucs.org
Mon Aug 14 10:08:32 BST 2017
On Sun, 2017-08-13 at 19:16 +0100, Andrew Price wrote:
> src/socket.c
>
>
>
> ...
> ...
> @@ -134,7 +134,7 @@ int ipcconn_connect(const char * target)
>
>
>
> 134
>
>
> 134
>
>
> struct addrinfo *list;
>
>
>
>
>
> 135
>
>
> 135
>
>
> int fd;
>
>
>
>
>
> 136
>
>
> 136
>
>
>
>
>
>
>
>
> 137
>
>
>
>
>
> - char *host = alloca(strlen(target));
>
>
>
>
>
>
>
>
> 137
>
>
> + char *host = alloca(strlen(target) + 1);
>
>
>
>
>
> 138
>
>
> 138
>
>
> char *port = NULL;
>
>
>
>
>
> 139
>
>
> 139
>
>
> strcpy(host, target);
>
>
>
>
>
> 140
>
>
> 140
>
>
>
>
>
>
>
>
Could just be a strdupa() instead ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sucs.org/pipermail/mw-devel/attachments/20170814/b22459d9/attachment.html>
More information about the mw-devel
mailing list