On 2015/3/16 15:58, Aneesh Kumar K.V wrote:
> 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.
>>
>> Signed-off-by: Shannon Zhao
>> Signed-off-by: Shannon Zha
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.
>
> Signed-off-by: Shannon Zhao
> Signed-off-by: Shannon Zhao
> ---
> hw/9pfs/virtio-9p-proxy.c | 3 ++-
> 1 fil
On 2015/3/13 20:50, Paolo Bonzini wrote:
>
>
> On 13/03/2015 12:09, Shannon Zhao wrote:
>> +g_assert(strlen(path) < sizeof(helper.sun_path));
>
> Ok.
>
>> sockfd = socket(AF_UNIX, SOCK_STREAM, 0);
>> if (sockfd < 0) {
>> fprintf(stderr, "failed to create socket: %s\n", st
On 13/03/2015 12:09, Shannon Zhao wrote:
> +g_assert(strlen(path) < sizeof(helper.sun_path));
Ok.
> sockfd = socket(AF_UNIX, SOCK_STREAM, 0);
> if (sockfd < 0) {
> fprintf(stderr, "failed to create socket: %s\n", strerror(errno));
> return -1;
> }
> -str
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
---
hw/9pfs/virtio-9p-proxy.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-