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

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

 



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
                 prev_sel->next = next_sel;
             }
             free(curr_sel);
@@ -421,6 +422,7 @@ static void vdagent_x11_set_clipboard_owner(struct vdagent_x11 *x11,
                 x11->clipboard_data_size = 0;
                 x11->expect_property_notify = 0;
             } else {
+                // coverity[var_deref_op] if it is not the first there's a previous
                 prev_conv->next = next_conv;
             }
             free(curr_conv);
diff --git a/src/vdagentd/virtio-port.c b/src/vdagentd/virtio-port.c
index b40cf86..b0556ce 100644
--- a/src/vdagentd/virtio-port.c
+++ b/src/vdagentd/virtio-port.c
@@ -425,6 +425,7 @@ static void vdagent_virtio_port_do_read(struct vdagent_virtio_port **vportp)
         vport->chunk_data_pos += n;
         if (vport->chunk_data_pos == vport->chunk_header.size) {
             vdagent_virtio_port_do_chunk(vportp);
+            // coverity[check_after_deref] previous function can change *vportd
             if (!*vportp)
                 return;
             vport->chunk_header_read = 0;
-- 
2.20.1

_______________________________________________
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]