diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9a027f32768..acb408b7e05 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2015-04-14 Gary Benson + + * 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 * MAINTAINERS: Update my email address. diff --git a/gdb/jit.c b/gdb/jit.c index e872c8fe25f..f977ea66f5a 100644 --- a/gdb/jit.c +++ b/gdb/jit.c @@ -126,6 +126,7 @@ mem_bfd_iovec_stat (struct bfd *abfd, void *stream, struct stat *sb) { struct target_buffer *buffer = (struct target_buffer*) stream; + memset (sb, 0, sizeof (struct stat)); sb->st_size = buffer->size; return 0; } diff --git a/gdb/minidebug.c b/gdb/minidebug.c index cc20914b787..98c2187f7ff 100644 --- a/gdb/minidebug.c +++ b/gdb/minidebug.c @@ -241,6 +241,7 @@ lzma_stat (struct bfd *abfd, { struct gdb_lzma_stream *lstream = stream; + memset (sb, 0, sizeof (struct stat)); sb->st_size = lzma_index_uncompressed_size (lstream->index); return 0; } diff --git a/gdb/solib-spu.c b/gdb/solib-spu.c index 250cf212eda..44fbf91506c 100644 --- a/gdb/solib-spu.c +++ b/gdb/solib-spu.c @@ -313,6 +313,7 @@ spu_bfd_iovec_stat (bfd *abfd, void *stream, struct stat *sb) 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; } diff --git a/gdb/spu-linux-nat.c b/gdb/spu-linux-nat.c index b0942a9c5bb..a043f53d377 100644 --- a/gdb/spu-linux-nat.c +++ b/gdb/spu-linux-nat.c @@ -313,6 +313,7 @@ spu_bfd_iovec_stat (struct bfd *abfd, void *stream, struct stat *sb) 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; }