Ticket #46291: 0002-bfdio-Invalid-size-of-memset.patch

File 0002-bfdio-Invalid-size-of-memset.patch, 686 bytes (added by adreg@…, 9 years ago)
  • bfd/bfdio.c

    From 12f36406eb4f1457db61082ec7b0bd8dd6530814 Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?Adam=20Engstr=C3=B6m?= <adaengst@gmail.com>
    Date: Sat, 20 Dec 2014 17:58:00 +0100
    Subject: [PATCH 2/4] bfdio: Invalid size of memset
    
    ---
     bfd/bfdio.c | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/bfd/bfdio.c b/bfd/bfdio.c
    index ce92781..9d7fc6f 100644
    a b memory_bstat (bfd *abfd, struct stat *statbuf) 
    577577{
    578578  struct bfd_in_memory *bim = (struct bfd_in_memory *) abfd->iostream;
    579579
    580   memset (statbuf, 0, sizeof (statbuf));
     580  memset (statbuf, 0, sizeof (*statbuf));
    581581  statbuf->st_size = bim->size;
    582582
    583583  return 0;