Daniel P. Berrangé writes:
> On Thu, Apr 11, 2019 at 02:20:27PM +0200, Markus Armbruster wrote:
>> Daniel P. Berrangé writes:
>>
>> > On Tue, Apr 09, 2019 at 11:37:44AM +0200, Philippe Mathieu-Daudé wrote:
>> [...]
>> >> I remember this post from Daniel where he suggests sticking to GLib
>> >>
On Thu, Apr 11, 2019 at 02:20:27PM +0200, Markus Armbruster wrote:
> Daniel P. Berrangé writes:
>
> > On Tue, Apr 09, 2019 at 11:37:44AM +0200, Philippe Mathieu-Daudé wrote:
> [...]
> >> I remember this post from Daniel where he suggests sticking to GLib
> >> G_N_ELEMENTS() (which looks similar t
Daniel P. Berrangé writes:
> On Tue, Apr 09, 2019 at 11:37:44AM +0200, Philippe Mathieu-Daudé wrote:
[...]
>> I remember this post from Daniel where he suggests sticking to GLib
>> G_N_ELEMENTS() (which looks similar to your suggestion):
>> https://lists.gnu.org/archive/html/qemu-devel/2018-11/ms
On Tue, Apr 09, 2019 at 11:37:44AM +0200, Philippe Mathieu-Daudé wrote:
> On 4/9/19 10:59 AM, Aleksandar Markovic wrote:
> >>
> >> Lidong Chen writes:
> >>
> >>> Due to an off-by-one error, the assert statements allow an
> >>> out-of-bounds array access.
> >>>
> >>> Signed-off-by: Lidong Chen
> >
Hi,
Thank you all for the reviews and comments! Since the fixes in sd.c have
gone through the review, I can fix the issue in util/main-loop.c
(mentioned in the reviews of Peter and Liam) in a separate patch.
Thanks,
Lidong
On 4/9/2019 3:39 AM, Liam Merwick wrote:
On 09/04/2019 06:51, Marku
On 09/04/2019 06:51, Markus Armbruster wrote:
Lidong Chen writes:
Due to an off-by-one error, the assert statements allow an
out-of-bounds array access.
Signed-off-by: Lidong Chen
Reviewed-by: Liam Merwick
---
hw/sd/sd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
di
On Tue, 9 Apr 2019 at 06:51, Markus Armbruster wrote:
> $ git-grep '<= ARRAY_SIZE'
Almost all of these are OK because they're the pattern of
checking a loop upper bound before doing a loop.
> hw/intc/arm_gicv3_cpuif.c:assert(aprmax <= ARRAY_SIZE(cs->ich_apr[0]));
> hw/intc/arm_gicv3_cpuif.c:
Markus wrote:
> This is the second fix for this bug pattern in a fortnight. Where's
> one, there are more:
>
> $ git-grep '<= ARRAY_SIZE'
> hw/intc/arm_gicv3_cpuif.c:assert(aprmax <= ARRAY_SIZE(cs->ich_apr[0]));
> hw/intc/arm_gicv3_cpuif.c:assert(aprmax <= ARRAY_SIZE(cs->ich_apr[0]));
>
> Thank you for bringing this to our attention, Markus. And thanks to Lidong
> too.
>
> Aleksandar
>
> P. S. Shouldn't perhaps our macro ARRAY_SIZE() be renamed to
> NUMBER_OF_ELEMENTS()?
I remember this post from Daniel where he suggests sticking to GLib
G_N_ELEMENT
t; util/module.c:assert(n_dirs <= ARRAY_SIZE(dirs));
>
> Lidong Chen, would you like to have a look at these?
>
> Cc'ing maintainers to help with further investigation.
>
Thank you for bringing this to our attention, Markus. And thanks to Lidong too.
Aleksandar
P. S. Shou
Lidong Chen writes:
> Due to an off-by-one error, the assert statements allow an
> out-of-bounds array access.
>
> Signed-off-by: Lidong Chen
> ---
> hw/sd/sd.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/sd/sd.c b/hw/sd/sd.c
> index aaab15f..818f86c 100644
>
Lidong Chen 于2019年4月9日周二 上午3:51写道:
> Due to an off-by-one error, the assert statements allow an
> out-of-bounds array access.
>
> Signed-off-by: Lidong Chen
>
Reviewed-by: Li Qiang
> ---
> hw/sd/sd.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/sd/sd.c b/h
Hi Philippe,
On 4/8/2019 2:27 PM, Philippe Mathieu-Daudé wrote:
Hi Lidong
On 4/8/19 9:04 PM, Lidong Chen wrote:
Due to an off-by-one error, the assert statements allow an
out-of-bounds array access.
... which can't happen. Thus harmless for 4.0.
I suppose this is a static analysis warning an
Hi Lidong
On 4/8/19 9:04 PM, Lidong Chen wrote:
> Due to an off-by-one error, the assert statements allow an
> out-of-bounds array access.
... which can't happen. Thus harmless for 4.0.
I suppose this is a static analysis warning and you didn't triggered it
while tracing.
Thanks for cleaning th
On Mon, Apr 8, 2019 at 9:51 PM Lidong Chen wrote:
>
> Due to an off-by-one error, the assert statements allow an
> out-of-bounds array access.
>
> Signed-off-by: Lidong Chen
Reviewed-by: Marc-André Lureau
> ---
> hw/sd/sd.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff
Due to an off-by-one error, the assert statements allow an
out-of-bounds array access.
Signed-off-by: Lidong Chen
---
hw/sd/sd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index aaab15f..818f86c 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
@@ -144
16 matches
Mail list logo