Prevent a memory exhaustion failure when running objdump on a fuzzed input file with...
[deliverable/binutils-gdb.git] / gdb / frv-linux-tdep.c
index eb87f93058b0287e8f05c585d1b6aa1ff2bffb78..c47f1f24f0b479c314e807b389f7661a58c5d5e8 100644 (file)
@@ -1,7 +1,7 @@
 /* Target-dependent code for GNU/Linux running on the Fujitsu FR-V,
    for GDB.
 
-   Copyright (C) 2004-2017 Free Software Foundation, Inc.
+   Copyright (C) 2004-2018 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -413,17 +413,14 @@ frv_linux_supply_gregset (const struct regset *regset,
                          int regnum, const void *gregs, size_t len)
 {
   int regi;
-  char zerobuf[MAX_REGISTER_SIZE];
-
-  memset (zerobuf, 0, MAX_REGISTER_SIZE);
 
   /* gr0 always contains 0.  Also, the kernel passes the TBR value in
      this slot.  */
-  regcache_raw_supply (regcache, first_gpr_regnum, zerobuf);
+  regcache->raw_supply_zeroed (first_gpr_regnum);
 
   /* Fill gr32, ..., gr63 with zeros. */
   for (regi = first_gpr_regnum + 32; regi <= last_gpr_regnum; regi++)
-    regcache_raw_supply (regcache, regi, zerobuf);
+    regcache->raw_supply_zeroed (regi);
 
   regcache_supply_regset (regset, regcache, regnum, gregs, len);
 }
@@ -483,9 +480,6 @@ frv_linux_elf_osabi_sniffer (bfd *abfd)
     return GDB_OSABI_UNKNOWN;
 }
 
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-void _initialize_frv_linux_tdep (void);
-
 void
 _initialize_frv_linux_tdep (void)
 {
This page took 0.025249 seconds and 4 git commands to generate.