[PATCH 2/5] rtems-fdt.c: Fix Resource leak (CID #1437645)
Niteesh G. S.
niteesh.gs at gmail.com
Thu Mar 18 16:46:52 UTC 2021
On Thu, Mar 18, 2021 at 1:01 AM Chris Johns <chrisj at rtems.org> wrote:
> I do not know. Maybe ask or post a patch?
>
I have sent a patch please take a look at it
https://lists.rtems.org/pipermail/devel/2021-March/065610.html
>
> On 18 Mar 2021, at 2:14 am, Niteesh G. S. <niteesh.gs at gmail.com> wrote:
>
>
>
>
> On Wed, 17 Mar 2021, 12:04 am Chris Johns, <chrisj at rtems.org> wrote:
>
>> On 17/3/21 2:14 am, Gedare Bloom wrote:
>> > On Tue, Mar 16, 2021 at 1:15 AM Niteesh G. S. <niteesh.gs at gmail.com>
>> wrote:
>> >> On Tue, 16 Mar 2021, 1:37 am Gedare Bloom, <gedare at rtems.org> wrote:
>> >>>
>> >>> This one looks ok to me, Niteesh?
>> >>
>> >> +1
>> >>
>> >> The below question is not related to this patch.
>> >>
>> >> Out of interest, I started going through the code and I am a bit
>> confused in the following statement
>> >>
>> >>
>> https://git.rtems.org/rtems/tree/cpukit/libmisc/rtems-fdt/rtems-fdt.c#n574
>> >>
>> >> This else block is reached when the FDT blob is not compressed, in
>> this case the size variable is set to the file size since this is raw data.
>> >>
>> >> In the while loop, we are looping on size, but we never modify the
>> size. I think, line 583 should be
>> >> size -= r;
>> >> Instead of
>> >> r -= size;
>> >> Is this a bug??
>> >> Or am I missing something?
>> >>
>> >
>> > it looks weird to me too. Chris?
>> >
>>
>> That is a bug. Nice find.
>>
> Is someone working on a patch for this? If not I'll send one.
>
> Thanks,
> Niteesh.
>
>
>> The use case for this call has an FPGA bitfile and the compressed FDT
>> file in a
>> single package.
>>
>> Thanks
>> Chris
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20210318/2f29a859/attachment.html>
More information about the devel
mailing list