Re: [PATCH] rtems-fdt/rtems-fdt.c: Fix bug in loop termination

2021-03-22 Thread Niteesh G. S.
On Sun, Mar 21, 2021 at 5:13 PM Christian Mauderer 
wrote:

> Hello Gedare and Niteesh,
>
> I pushed the patch on master and 5.
>
> Niteesh: Thanks for finding and fixing that bug.
>
Thanks for pushing this and Beagle patches.

Thank you,
Niteesh

> Best regards
>
> Christian
>
> On 21/03/2021 08:04, Niteesh G. S. wrote:
> >
> >
> > On Sat, Mar 20, 2021 at 11:39 AM Gedare Bloom  > > wrote:
> >
> > This looks good to me. Is the bug also on 5? If so, a ticket should
> be
> > opened and a patch filed for 5.2.
> >
> > This bug is also present in 5.
> > I have filed a ticket for this https://devel.rtems.org/ticket/4350
> > 
> >
> > If someone cares to push this please go ahead. I wouldn't get to it
> > until next week sometime. Niteesh, ping it on Tuesday if no one has
> > pushed.
> >
> > OK
> >
> >
> > On Wed, Mar 17, 2021 at 8:51 PM G S Niteesh Babu
> > mailto:niteesh...@gmail.com>> wrote:
> >  >
> >  > The while loop, loops infinitely in case of raw FDT data.
> >  > The loop condition (size) is not modified during iterations.
> >  > ---
> >  >  cpukit/libmisc/rtems-fdt/rtems-fdt.c | 2 +-
> >  >  1 file changed, 1 insertion(+), 1 deletion(-)
> >  >
> >  > diff --git a/cpukit/libmisc/rtems-fdt/rtems-fdt.c
> > b/cpukit/libmisc/rtems-fdt/rtems-fdt.c
> >  > index 0ea365314f..7747ba9bf8 100644
> >  > --- a/cpukit/libmisc/rtems-fdt/rtems-fdt.c
> >  > +++ b/cpukit/libmisc/rtems-fdt/rtems-fdt.c
> >  > @@ -580,7 +580,7 @@ rtems_fdt_load (const char* filename,
> > rtems_fdt_handle* handle)
> >  >  close (bf);
> >  >  return -RTEMS_FDT_ERR_READ_FAIL;
> >  >}
> >  > -  r -= size;
> >  > +  size -= r;
> >  >buf += r;
> >  >  }
> >  >}
> >  > --
> >  > 2.17.1
> >  >
> >  > ___
> >  > devel mailing list
> >  > devel@rtems.org 
> >  > http://lists.rtems.org/mailman/listinfo/devel
> > 
> >
> >
> > ___
> > devel mailing list
> > devel@rtems.org
> > http://lists.rtems.org/mailman/listinfo/devel
> >
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] rtems-fdt/rtems-fdt.c: Fix bug in loop termination

2021-03-21 Thread Chris Johns
On 21/3/21 10:43 pm, Christian Mauderer wrote:
> I pushed the patch on master and 5.

Thank you
Chris
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH] rtems-fdt/rtems-fdt.c: Fix bug in loop termination

2021-03-21 Thread Christian Mauderer

Hello Gedare and Niteesh,

I pushed the patch on master and 5.

Niteesh: Thanks for finding and fixing that bug.

Best regards

Christian

On 21/03/2021 08:04, Niteesh G. S. wrote:



On Sat, Mar 20, 2021 at 11:39 AM Gedare Bloom > wrote:


This looks good to me. Is the bug also on 5? If so, a ticket should be
opened and a patch filed for 5.2.

This bug is also present in 5.
I have filed a ticket for this https://devel.rtems.org/ticket/4350 



If someone cares to push this please go ahead. I wouldn't get to it
until next week sometime. Niteesh, ping it on Tuesday if no one has
pushed.

OK


On Wed, Mar 17, 2021 at 8:51 PM G S Niteesh Babu
mailto:niteesh...@gmail.com>> wrote:
 >
 > The while loop, loops infinitely in case of raw FDT data.
 > The loop condition (size) is not modified during iterations.
 > ---
 >  cpukit/libmisc/rtems-fdt/rtems-fdt.c | 2 +-
 >  1 file changed, 1 insertion(+), 1 deletion(-)
 >
 > diff --git a/cpukit/libmisc/rtems-fdt/rtems-fdt.c
b/cpukit/libmisc/rtems-fdt/rtems-fdt.c
 > index 0ea365314f..7747ba9bf8 100644
 > --- a/cpukit/libmisc/rtems-fdt/rtems-fdt.c
 > +++ b/cpukit/libmisc/rtems-fdt/rtems-fdt.c
 > @@ -580,7 +580,7 @@ rtems_fdt_load (const char* filename,
rtems_fdt_handle* handle)
 >          close (bf);
 >          return -RTEMS_FDT_ERR_READ_FAIL;
 >        }
 > -      r -= size;
 > +      size -= r;
 >        buf += r;
 >      }
 >    }
 > --
 > 2.17.1
 >
 > ___
 > devel mailing list
 > devel@rtems.org 
 > http://lists.rtems.org/mailman/listinfo/devel



___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] rtems-fdt/rtems-fdt.c: Fix bug in loop termination

2021-03-21 Thread Niteesh G. S.
On Sat, Mar 20, 2021 at 11:39 AM Gedare Bloom  wrote:

> This looks good to me. Is the bug also on 5? If so, a ticket should be
> opened and a patch filed for 5.2.
>
This bug is also present in 5.
I have filed a ticket for this https://devel.rtems.org/ticket/4350

> If someone cares to push this please go ahead. I wouldn't get to it
> until next week sometime. Niteesh, ping it on Tuesday if no one has
> pushed.
>
OK

>
> On Wed, Mar 17, 2021 at 8:51 PM G S Niteesh Babu 
> wrote:
> >
> > The while loop, loops infinitely in case of raw FDT data.
> > The loop condition (size) is not modified during iterations.
> > ---
> >  cpukit/libmisc/rtems-fdt/rtems-fdt.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/cpukit/libmisc/rtems-fdt/rtems-fdt.c
> b/cpukit/libmisc/rtems-fdt/rtems-fdt.c
> > index 0ea365314f..7747ba9bf8 100644
> > --- a/cpukit/libmisc/rtems-fdt/rtems-fdt.c
> > +++ b/cpukit/libmisc/rtems-fdt/rtems-fdt.c
> > @@ -580,7 +580,7 @@ rtems_fdt_load (const char* filename,
> rtems_fdt_handle* handle)
> >  close (bf);
> >  return -RTEMS_FDT_ERR_READ_FAIL;
> >}
> > -  r -= size;
> > +  size -= r;
> >buf += r;
> >  }
> >}
> > --
> > 2.17.1
> >
> > ___
> > devel mailing list
> > devel@rtems.org
> > http://lists.rtems.org/mailman/listinfo/devel
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] rtems-fdt/rtems-fdt.c: Fix bug in loop termination

2021-03-20 Thread Gedare Bloom
This looks good to me. Is the bug also on 5? If so, a ticket should be
opened and a patch filed for 5.2.

If someone cares to push this please go ahead. I wouldn't get to it
until next week sometime. Niteesh, ping it on Tuesday if no one has
pushed.

On Wed, Mar 17, 2021 at 8:51 PM G S Niteesh Babu  wrote:
>
> The while loop, loops infinitely in case of raw FDT data.
> The loop condition (size) is not modified during iterations.
> ---
>  cpukit/libmisc/rtems-fdt/rtems-fdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/cpukit/libmisc/rtems-fdt/rtems-fdt.c 
> b/cpukit/libmisc/rtems-fdt/rtems-fdt.c
> index 0ea365314f..7747ba9bf8 100644
> --- a/cpukit/libmisc/rtems-fdt/rtems-fdt.c
> +++ b/cpukit/libmisc/rtems-fdt/rtems-fdt.c
> @@ -580,7 +580,7 @@ rtems_fdt_load (const char* filename, rtems_fdt_handle* 
> handle)
>  close (bf);
>  return -RTEMS_FDT_ERR_READ_FAIL;
>}
> -  r -= size;
> +  size -= r;
>buf += r;
>  }
>}
> --
> 2.17.1
>
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH] rtems-fdt/rtems-fdt.c: Fix bug in loop termination

2021-03-17 Thread G S Niteesh Babu
The while loop, loops infinitely in case of raw FDT data.
The loop condition (size) is not modified during iterations.
---
 cpukit/libmisc/rtems-fdt/rtems-fdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpukit/libmisc/rtems-fdt/rtems-fdt.c 
b/cpukit/libmisc/rtems-fdt/rtems-fdt.c
index 0ea365314f..7747ba9bf8 100644
--- a/cpukit/libmisc/rtems-fdt/rtems-fdt.c
+++ b/cpukit/libmisc/rtems-fdt/rtems-fdt.c
@@ -580,7 +580,7 @@ rtems_fdt_load (const char* filename, rtems_fdt_handle* 
handle)
 close (bf);
 return -RTEMS_FDT_ERR_READ_FAIL;
   }
-  r -= size;
+  size -= r;
   buf += r;
 }
   }
-- 
2.17.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel