Zero the buffer containing the .gnu_debuglink section before writing
into it. Prior to this commit the .gnu_debuglink section can have up to 3 bytes of uninitialized garbage; as a result, .ko files could change vary between builds. Approved by: dim MFC after: 7 days
This commit is contained in:
parent
0ea0127a4d
commit
4a56bb2033
@ -1151,7 +1151,7 @@ bfd_fill_in_gnu_debuglink_section (bfd *abfd,
|
|||||||
debuglink_size &= ~3;
|
debuglink_size &= ~3;
|
||||||
debuglink_size += 4;
|
debuglink_size += 4;
|
||||||
|
|
||||||
contents = malloc (debuglink_size);
|
contents = bfd_zmalloc (debuglink_size);
|
||||||
if (contents == NULL)
|
if (contents == NULL)
|
||||||
{
|
{
|
||||||
/* XXX Should we delete the section from the bfd ? */
|
/* XXX Should we delete the section from the bfd ? */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user