+2015-08-04 Yuriy M. Kaminskiy" <yumkam@gmail.com>
+ Tyler Hicks <tyhicks@canonical.com>
+
+ PR binutils/18750
+ * ihex.c (ihex_scan): Fixes incorrect escape sequence in error message
+ and stack overflow when char is signed and \200-\376 was in place of hex
+ digit; also fixes \377 was handled as EOF instead of "incorrect character".
+ (ihex_read_section): Changed for consistency.
+ (ihex_bad_byte): Prevent (now impossible to trigger) stack
+ overflow and incorrect escape sequence handling.
+ * srec.c (srec_bad_byte): Likewise.
+
2015-08-03 Hans-Peter Nilsson <hp@axis.com>
* elf32-cris.c (cris_elf_relocate_section)
char buf[10];
if (! ISPRINT (c))
- sprintf (buf, "\\%03o", (unsigned int) c);
+ sprintf (buf, "\\%03o", (unsigned int) c & 0xff);
else
{
buf[0] = c;
else
{
file_ptr pos;
- char hdr[8];
+ unsigned char hdr[8];
unsigned int i;
unsigned int len;
bfd_vma addr;
error = FALSE;
while ((c = ihex_get_byte (abfd, &error)) != EOF)
{
- char hdr[8];
+ unsigned char hdr[8];
unsigned int len;
unsigned int type;
unsigned int i;
char buf[40];
if (! ISPRINT (c))
- sprintf (buf, "\\%03o", (unsigned int) c);
+ sprintf (buf, "\\%03o", (unsigned int) c & 0xff);
else
{
buf[0] = c;
+2015-08-04 Yuriy M. Kaminskiy" <yumkam@gmail.com>
+ Tyler Hicks <tyhicks@canonical.com>
+
+ PR binutils/18750
+ * readelf.c (process_mips_specific): Fix incorrect escape
+ sequence handling.
+
+2015-08-04 Nick Clifton <nickc@redhat.com>
+
+ * ar.c (extract_file): Free cbuf if the path is invalid.
+
2015-07-27 H.J. Lu <hongjiu.lu@intel.com>
* configure: Regenerated.
len = sizeof (* eopt);
while (len < option->size)
{
- char datum = * ((char *) eopt + offset + len);
+ unsigned char datum = * ((unsigned char *) eopt + offset + len);
if (ISPRINT (datum))
printf ("%c", datum);