* [Qemu-devel] [PATCH] virtio-serial: Fix check for 'assert'; prevent NULL derefs
@ 2010-04-30 11:13 Amit Shah
2010-04-30 13:50 ` [Qemu-devel] " Juan Quintela
2010-05-03 17:14 ` [Qemu-devel] " Anthony Liguori
0 siblings, 2 replies; 3+ messages in thread
From: Amit Shah @ 2010-04-30 11:13 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Amit Shah, qemu list, Juan Quintela
In the flush_queued_data() function, we expect port to be valid. Assert
only for port and not port || discard.
Reported-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
---
hw/virtio-serial-bus.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c
index 97694d5..3ce95e8 100644
--- a/hw/virtio-serial-bus.c
+++ b/hw/virtio-serial-bus.c
@@ -137,7 +137,7 @@ static void do_flush_queued_data(VirtIOSerialPort *port, VirtQueue *vq,
static void flush_queued_data(VirtIOSerialPort *port, bool discard)
{
- assert(port || discard);
+ assert(port);
do_flush_queued_data(port, port->ovq, &port->vser->vdev, discard);
}
--
1.6.2.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Qemu-devel] Re: [PATCH] virtio-serial: Fix check for 'assert'; prevent NULL derefs
2010-04-30 11:13 [Qemu-devel] [PATCH] virtio-serial: Fix check for 'assert'; prevent NULL derefs Amit Shah
@ 2010-04-30 13:50 ` Juan Quintela
2010-05-03 17:14 ` [Qemu-devel] " Anthony Liguori
1 sibling, 0 replies; 3+ messages in thread
From: Juan Quintela @ 2010-04-30 13:50 UTC (permalink / raw)
To: Amit Shah; +Cc: qemu list
Amit Shah <amit.shah@redhat.com> wrote:
> In the flush_queued_data() function, we expect port to be valid. Assert
> only for port and not port || discard.
>
> Reported-by: Juan Quintela <quintela@redhat.com>
> Signed-off-by: Amit Shah <amit.shah@redhat.com>
reviewed-by: Juan Quintela <quintela@redhat.com>
> ---
> hw/virtio-serial-bus.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c
> index 97694d5..3ce95e8 100644
> --- a/hw/virtio-serial-bus.c
> +++ b/hw/virtio-serial-bus.c
> @@ -137,7 +137,7 @@ static void do_flush_queued_data(VirtIOSerialPort *port, VirtQueue *vq,
>
> static void flush_queued_data(VirtIOSerialPort *port, bool discard)
> {
> - assert(port || discard);
> + assert(port);
>
> do_flush_queued_data(port, port->ovq, &port->vser->vdev, discard);
> }
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] virtio-serial: Fix check for 'assert'; prevent NULL derefs
2010-04-30 11:13 [Qemu-devel] [PATCH] virtio-serial: Fix check for 'assert'; prevent NULL derefs Amit Shah
2010-04-30 13:50 ` [Qemu-devel] " Juan Quintela
@ 2010-05-03 17:14 ` Anthony Liguori
1 sibling, 0 replies; 3+ messages in thread
From: Anthony Liguori @ 2010-05-03 17:14 UTC (permalink / raw)
To: Amit Shah; +Cc: qemu list, Juan Quintela
On 04/30/2010 06:13 AM, Amit Shah wrote:
> In the flush_queued_data() function, we expect port to be valid. Assert
> only for port and not port || discard.
>
> Reported-by: Juan Quintela<quintela@redhat.com>
> Signed-off-by: Amit Shah<amit.shah@redhat.com>
>
Applied. Thanks.
Regards,
Anthony Liguori
> ---
> hw/virtio-serial-bus.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c
> index 97694d5..3ce95e8 100644
> --- a/hw/virtio-serial-bus.c
> +++ b/hw/virtio-serial-bus.c
> @@ -137,7 +137,7 @@ static void do_flush_queued_data(VirtIOSerialPort *port, VirtQueue *vq,
>
> static void flush_queued_data(VirtIOSerialPort *port, bool discard)
> {
> - assert(port || discard);
> + assert(port);
>
> do_flush_queued_data(port, port->ovq,&port->vser->vdev, discard);
> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-05-03 17:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-30 11:13 [Qemu-devel] [PATCH] virtio-serial: Fix check for 'assert'; prevent NULL derefs Amit Shah
2010-04-30 13:50 ` [Qemu-devel] " Juan Quintela
2010-05-03 17:14 ` [Qemu-devel] " Anthony Liguori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).