• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

Révision4a9f7d653c089fdd8ca66a51caab7c9687f50cd1 (tree)
l'heure2018-08-01 22:42:37
AuteurNick Clifton <nickc@redh...>
CommiterNick Clifton

Message de Log

Fix potential illegal memory access in AVR backend.

* elf32-avr.c (avr_stub_name): Check for a NULL return from
bfd_malloc.

Change Summary

Modification

--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
1+2018-08-01 Nick Clifton <nickc@redhat.com>
2+
3+ * elf32-avr.c (avr_stub_name): Check for a NULL return from
4+ bfd_malloc.
5+
16 2018-08-01 Zenith <zenith432@users.sourceforge.net>
27
38 PR 23460
--- a/bfd/elf32-avr.c
+++ b/bfd/elf32-avr.c
@@ -3295,10 +3295,10 @@ avr_stub_name (const asection *symbol_section,
32953295
32963296 len = 8 + 1 + 8 + 1 + 1;
32973297 stub_name = bfd_malloc (len);
3298-
3299- sprintf (stub_name, "%08x+%08x",
3300- symbol_section->id & 0xffffffff,
3301- (unsigned int) ((rela->r_addend & 0xffffffff) + symbol_offset));
3298+ if (stub_name != NULL)
3299+ sprintf (stub_name, "%08x+%08x",
3300+ symbol_section->id & 0xffffffff,
3301+ (unsigned int) ((rela->r_addend & 0xffffffff) + symbol_offset));
33023302
33033303 return stub_name;
33043304 }