Re: [Qemu-devel] [PATCH] sockets: report error if UNIX socket path is too long

2017-05-24 Thread Eric Blake
On 05/24/2017 10:54 AM, Eric Blake wrote: > On 05/24/2017 10:42 AM, Daniel P. Berrange wrote: >> The 'struct sockaddr_un' only allows 108 bytes for the socket >> path. Currently QEMU uses snprintf() and so silently truncates >> the socket path provided by the user. This is undesirable because >> th

Re: [Qemu-devel] [PATCH] sockets: report error if UNIX socket path is too long

2017-05-24 Thread Eric Blake
On 05/24/2017 10:42 AM, Daniel P. Berrange wrote: > The 'struct sockaddr_un' only allows 108 bytes for the socket > path. Currently QEMU uses snprintf() and so silently truncates > the socket path provided by the user. This is undesirable because > the user will then be unable to connect to the pat

[Qemu-devel] [PATCH] sockets: report error if UNIX socket path is too long

2017-05-24 Thread Daniel P. Berrange
The 'struct sockaddr_un' only allows 108 bytes for the socket path. Currently QEMU uses snprintf() and so silently truncates the socket path provided by the user. This is undesirable because the user will then be unable to connect to the path they asked for. This change makes QEMU bounds check and