[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 03/18] posix-aio-compat.c: fix warning with _FOR
From: |
Paul Brook |
Subject: |
Re: [Qemu-devel] [PATCH 03/18] posix-aio-compat.c: fix warning with _FORTIFY_SOURCE |
Date: |
Sun, 20 Dec 2009 23:02:56 +0000 |
User-agent: |
KMail/1.12.4 (Linux/2.6.32-trunk-amd64; KDE/4.3.4; x86_64; ; ) |
> --- a/posix-aio-compat.c
> +++ b/posix-aio-compat.c
> @@ -502,7 +502,8 @@ static void aio_signal_handler(int signum)
> if (posix_aio_state) {
> char byte = 0;
>
> - write(posix_aio_state->wfd, &byte, sizeof(byte));
> + if (write(posix_aio_state->wfd, &byte, sizeof(byte)) != sizeof(byte))
> + die("write()");
I'm pretty sure this change is wrong, and shows why you should never blindly
believe dumb analysis tools.
The write may fail harmlessly if the pipe is already full.
Paul
- [Qemu-devel] [PATCH 18/18] linux-user/mmap.c: fix warnings with _FORTIFY_SOURCE, (continued)
- [Qemu-devel] [PATCH 18/18] linux-user/mmap.c: fix warnings with _FORTIFY_SOURCE, Kirill A. Shutemov, 2009/12/19
- Re: [Qemu-devel] [PATCH 17/18] path.c fix warning with _FORTIFY_SOURCE, Blue Swirl, 2009/12/22
- Re: [Qemu-devel] [PATCH 16/18] hw/pc.c: fix warnings with _FORTIFY_SOURCE, Blue Swirl, 2009/12/22
- Re: [Qemu-devel] [PATCH 14/18] vl.c: fix warning with _FORTIFY_SOURCE, Blue Swirl, 2009/12/22
- Re: [Qemu-devel] [PATCH 12/18] savevm.c: fix warning with _FORTIFY_SOURCE, Blue Swirl, 2009/12/22
- Re: [Qemu-devel] [PATCH 11/18] usb-linux.c: fix warning with _FORTIFY_SOURCE, Blue Swirl, 2009/12/22
- Re: [Qemu-devel] [PATCH 10/18] net/slirp.c: fix warning with _FORTIFY_SOURCE, Blue Swirl, 2009/12/22
- [Qemu-devel] Re: [PATCH 09/18] block/qcow2.c: fix warnings with _FORTIFY_SOURCE, Andreas Schwab, 2009/12/20
- Re: [Qemu-devel] [PATCH 08/18] block/vvfat.c: fix warnings with _FORTIFY_SOURCE, Kevin Wolf, 2009/12/20
- Re: [Qemu-devel] [PATCH 07/18] block/bochs.c: fix warning with _FORTIFY_SOURCE, Blue Swirl, 2009/12/22
- Re: [Qemu-devel] [PATCH 03/18] posix-aio-compat.c: fix warning with _FORTIFY_SOURCE,
Paul Brook <=
- Re: [Qemu-devel] [PATCH 02/18] block.c: fix warning with _FORTIFY_SOURCE, Blue Swirl, 2009/12/22
- Re: [Qemu-devel] [PATCH 01/18] Do not disable _FORTIFY_SOURCE, Blue Swirl, 2009/12/20