From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Julien Grall <julien.grall@arm.com>, Xen-devel <xen-devel@lists.xen.org>
Cc: Juergen Gross <jgross@suse.com>,
Stefano Stabellini <sstabellini@kernel.org>
Subject: Re: PING ARM [PATCH v2] xen/cmdline: Fix buggy strncmp(s, LITERAL, ss - s) construct
Date: Mon, 14 Jan 2019 16:59:58 +0000 [thread overview]
Message-ID: <5d7290c3-02e2-c54d-9a65-cc8b8019a4cc@citrix.com> (raw)
In-Reply-To: <4f1859e5-c901-3e3e-ffc2-0e7233d1c794@arm.com>
On 14/01/2019 16:07, Julien Grall wrote:
> Hi Andrew,
>
> On 14/01/2019 15:17, Andrew Cooper wrote:
>>> diff --git a/xen/arch/arm/efi/efi-boot.h b/xen/arch/arm/efi/efi-boot.h
>>> index ca655ff..22a86ec 100644
>>> --- a/xen/arch/arm/efi/efi-boot.h
>>> +++ b/xen/arch/arm/efi/efi-boot.h
>>> @@ -212,7 +212,7 @@ EFI_STATUS __init
>>> fdt_add_uefi_nodes(EFI_SYSTEM_TABLE *sys_table,
>>> break;
>>> type = fdt_getprop(fdt, node, "device_type", &len);
>>> - if ( type && strncmp(type, "memory", len) == 0 )
>>> + if ( type && len == 6 && strncmp(type, "memory", 6) == 0 )
>
> string property terminates with NUL and is included in the len. So I
> don't think this change is correct.
Are you saying that len is 7 here then?
~Andrew
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2019-01-14 16:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-04 17:17 [PATCH v2] xen/cmdline: Fix buggy strncmp(s, LITERAL, ss - s) construct Andrew Cooper
2019-01-07 8:59 ` Jan Beulich
2019-01-07 17:28 ` Andrew Cooper
2019-01-08 8:31 ` Jan Beulich
2019-01-16 12:08 ` George Dunlap
2019-01-16 12:48 ` Jan Beulich
2019-01-14 15:17 ` PING ARM " Andrew Cooper
2019-01-14 16:07 ` Julien Grall
2019-01-14 16:59 ` Andrew Cooper [this message]
2019-01-14 17:16 ` Julien Grall
2019-01-14 17:43 ` Andrew Cooper
2019-01-15 11:39 ` Julien Grall
2019-01-15 8:47 ` Jan Beulich
2019-01-15 11:11 ` Julien Grall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5d7290c3-02e2-c54d-9a65-cc8b8019a4cc@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=jgross@suse.com \
--cc=julien.grall@arm.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.