Re: [PATCH vd_agent_linux v3 1/2] Ignore some Coverity reports

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 04, 2019 at 10:56:23AM +0000, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> ---
>  src/udscs.c                | 2 ++
>  src/vdagent/x11.c          | 2 ++
>  src/vdagentd/virtio-port.c | 1 +
>  3 files changed, 5 insertions(+)
> 
> diff --git a/src/udscs.c b/src/udscs.c
> index 05fe41b..32bd6e6 100644
> --- a/src/udscs.c
> +++ b/src/udscs.c
> @@ -341,12 +341,14 @@ static gboolean udscs_io_channel_cb(GIOChannel *source,
>  
>      if (condition & G_IO_IN) {
>          udscs_do_read(&conn);
> +        // coverity[check_after_deref] previous function can change conn
>          if (conn == NULL)
>              return G_SOURCE_REMOVE;
>          return G_SOURCE_CONTINUE;
>      }
>      if (condition & G_IO_OUT) {
>          udscs_do_write(&conn);
> +        // coverity[check_after_deref] previous function can change conn
>          if (conn == NULL)
>              return G_SOURCE_REMOVE;
>          if (conn->write_buf)
> diff --git a/src/vdagent/x11.c b/src/vdagent/x11.c
> index 53d3c48..02b4858 100644
> --- a/src/vdagent/x11.c
> +++ b/src/vdagent/x11.c
> @@ -393,6 +393,7 @@ static void vdagent_x11_set_clipboard_owner(struct vdagent_x11 *x11,
>                  x11->selection_req_data_size = 0;
>                  x11->selection_req_atom = None;
>              } else {
> +                // coverity[var_deref_op] if it is not the first there's a previous

Not the easiest code to follow imo, not sure there's a better way to
write it though..


Acked-by: Christophe Fergeau <cfergeau@xxxxxxxxxx>

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]