* deffilep.y (def_file_add_directive): Avoid readin past end of
buffer.
+2013-09-17 Nick Clifton <nickc@redhat.com>
+
+ PR ld/15957
+ * deffilep.y (def_file_add_directive): Avoid readin past end of
+ buffer.
+
2013-08-28 Nick Clifton <nickc@redhat.com>
PR ld/15896
if (!diropts[i].param)
{
- char saved;
+ if (tend < pend)
+ {
+ char saved;
- saved = * tend;
- * tend = 0;
- /* xgettext:c-format */
- einfo (_("Warning: .drectve `%s' unrecognized\n"), param);
- * tend = saved;
+ saved = * tend;
+ * tend = 0;
+ /* xgettext:c-format */
+ einfo (_("Warning: .drectve `%s' unrecognized\n"), param);
+ * tend = saved;
+ }
+ else
+ {
+ einfo (_("Warning: corrupt .drectve at end of def file\n"));
+ }
}
lex_parse_string = 0;