[PATCH 2/4] libdl: Fix cache corruption bugs.

Chris Johns chrisj at rtems.org
Sun Aug 14 01:50:35 UTC 2016


On 14/08/2016 4:50 AM, Patrick Gauvin wrote:
>> @@ -84,8 +99,15 @@ rtems_rtl_obj_cache_read (rtems_rtl_obj_cache_t* cache,
>>        return false;
>>      }
>>
>> +    /*
>> +     * We sometimes are asked to read strings of a length we do not know.
>> +     */
>>      if ((offset + *length) > cache->file_size)
>> +    {
>>        *length = cache->file_size - offset;
>> +      if (rtems_rtl_trace (RTEMS_RTL_TRACE_CACHE))
>> +        printf ("rtl: cache: %2d: truncate length=%d\n", fd, (int) length);
>> +    }
>>    }
>>
>>    while (true)
> 
> Just a minor thing, in the arguments for the printf call in this hunk,
> 'length' is not dereferenced.

Ah thank you, I will fix the patch before pushing.

> 
> Thank you for working on this, I'm excited to try out these patches.
> 

No problem, I will create a 4.11 patch. The test case was great and now
I have changed the RTEMS build system C++ in the tests is possible but
dl04 will not be pushed to 4.11 because the build system change will not
be back ported.

Chris



More information about the devel mailing list