[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [qemu-s390x] [PATCH v3 6/8] s390-ccw: interactive boot menu for eckd
From: |
Thomas Huth |
Subject: |
Re: [qemu-s390x] [PATCH v3 6/8] s390-ccw: interactive boot menu for eckd dasd (print menu) |
Date: |
Wed, 17 Jan 2018 09:58:57 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 |
On 15.01.2018 17:44, Collin L. Walling wrote:
> Prints the menu data starting from the zIPL menu banner.
>
> Signed-off-by: Collin L. Walling <address@hidden>
> ---
[...]
> static void run_eckd_boot_script(block_number_t mbr_block_nr,
> diff --git a/pc-bios/s390-ccw/menu.c b/pc-bios/s390-ccw/menu.c
> index e15a7f2..30470b3 100644
> --- a/pc-bios/s390-ccw/menu.c
> +++ b/pc-bios/s390-ccw/menu.c
> @@ -10,10 +10,52 @@
> */
>
> #include "menu.h"
> +#include "s390-ccw.h"
>
> static uint8_t flags;
> static uint64_t timeout;
>
> +static void zipl_println(const char *data, size_t len)
> +{
> + char buf[len + 1];
> +
> + ebcdic_to_ascii(data, buf, len);
> + buf[len] = '\n';
> + buf[len + 1] = '\0';
Buffer overflow by 1. You need to declare "char buf[len + 2]".
Or drop the 0-termination and use write(1, buf, len + 1) instead of
sclp_print().
> + sclp_print(buf);
> +}
Thomas
- Re: [qemu-s390x] [PATCH v3 4/8] s390-ccw: interactive boot menu for eckd dasd (menu setup), (continued)
[qemu-s390x] [PATCH v3 5/8] s390-ccw: interactive boot menu for eckd dasd (read stage2 data), Collin L. Walling, 2018/01/15
[qemu-s390x] [PATCH v3 8/8] s390-ccw: interactive boot menu for scsi, Collin L. Walling, 2018/01/15
[qemu-s390x] [PATCH v3 6/8] s390-ccw: interactive boot menu for eckd dasd (print menu), Collin L. Walling, 2018/01/15
- Re: [qemu-s390x] [PATCH v3 6/8] s390-ccw: interactive boot menu for eckd dasd (print menu),
Thomas Huth <=
[qemu-s390x] [PATCH v3 7/8] s390-ccw: interactive boot menu for eckd dasd (read input), Collin L. Walling, 2018/01/15
Re: [qemu-s390x] [Qemu-devel] [PATCH v3 0/8] Interactive Boot Menu for DASD and SCSI Guests on s390x, no-reply, 2018/01/15