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

Patrick Gauvin pggauvin at gmail.com
Sat Aug 13 18:50:36 UTC 2016


> @@ -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.

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

-Patrick



More information about the devel mailing list