Re: [Qemu-devel] [PATCH v2] fsdev/virtfs-proxy-helper: Fix possible overflow

2015-03-31 Thread Stefan Hajnoczi
On Mon, Mar 30, 2015 at 07:33:33PM +0530, Aneesh Kumar K.V wrote: > Stefan Hajnoczi writes: > > > On Sat, Mar 14, 2015 at 10:00:16AM +0800, Shannon Zhao wrote: > >> It's detected by coverity. As max of sockaddr_un.sun_path is > >> sizeof(helper.sun_path), should check the length of source > >> an

Re: [Qemu-devel] [PATCH v2] fsdev/virtfs-proxy-helper: Fix possible overflow

2015-03-30 Thread Aneesh Kumar K.V
Stefan Hajnoczi writes: > On Sat, Mar 14, 2015 at 10:00:16AM +0800, Shannon Zhao wrote: >> It's detected by coverity. As max of sockaddr_un.sun_path is >> sizeof(helper.sun_path), should check the length of source >> and use strncpy instead of strcpy. >> >> Signed-off-by: Shannon Zhao >> Signed

Re: [Qemu-devel] [PATCH v2] fsdev/virtfs-proxy-helper: Fix possible overflow

2015-03-30 Thread Stefan Hajnoczi
On Sat, Mar 14, 2015 at 10:00:16AM +0800, Shannon Zhao wrote: > It's detected by coverity. As max of sockaddr_un.sun_path is > sizeof(helper.sun_path), should check the length of source > and use strncpy instead of strcpy. > > Signed-off-by: Shannon Zhao > Signed-off-by: Shannon Zhao > --- >

Re: [Qemu-devel] [PATCH v2] fsdev/virtfs-proxy-helper: Fix possible overflow

2015-03-15 Thread Aneesh Kumar K.V
Shannon Zhao writes: > It's detected by coverity. As max of sockaddr_un.sun_path is > sizeof(helper.sun_path), should check the length of source > and use strncpy instead of strcpy. updated such that, The socket name specified should fit in the sockadd_un.sun_path. If not abort. with that appl