GDB has five places where it pretends to stat for bfd_openr_iovec.
Four of these only set the incoming buffer's st_size, leaving the
other fields unchanged, which is to say very likely populated with
random values from the stack. remote_bfd_iovec_stat was fixed in
0a93529c56714b1da3d7106d3e0300764f8bb81c; this commit fixes the
other four.
gdb/ChangeLog:
* jit.c (mem_bfd_iovec_stat): Zero supplied buffer.
* minidebug.c (lzma_stat): Likewise.
* solib-spu.c (spu_bfd_iovec_stat): Likewise.
* spu-linux-nat.c (spu_bfd_iovec_stat): Likewise.
+2015-04-14 Gary Benson <gbenson@redhat.com>
+
+ * jit.c (mem_bfd_iovec_stat): Zero supplied buffer.
+ * minidebug.c (lzma_stat): Likewise.
+ * solib-spu.c (spu_bfd_iovec_stat): Likewise.
+ * spu-linux-nat.c (spu_bfd_iovec_stat): Likewise.
+
2015-04-13 Stan Shebs <stanshebs@google.com>
* MAINTAINERS: Update my email address.
{
struct target_buffer *buffer = (struct target_buffer*) stream;
+ memset (sb, 0, sizeof (struct stat));
sb->st_size = buffer->size;
return 0;
}
{
struct gdb_lzma_stream *lstream = stream;
+ memset (sb, 0, sizeof (struct stat));
sb->st_size = lzma_index_uncompressed_size (lstream->index);
return 0;
}
table to find the extent of the last section but that seems
pointless when the size is needed only for checks of other
parsed values in dbxread.c. */
+ memset (sb, 0, sizeof (struct stat));
sb->st_size = INT_MAX;
return 0;
}
table to find the extent of the last section but that seems
pointless when the size is needed only for checks of other
parsed values in dbxread.c. */
+ memset (sb, 0, sizeof (struct stat));
sb->st_size = INT_MAX;
return 0;
}