[MIPS] Add Loongson 2K1000 proccessor support.
[deliverable/binutils-gdb.git] / binutils / rescoff.c
index 3e63e49901d3c96c1e661a26de6e00eda5f1b7bf..fed362e7ef852dfdf0ce8bf9c22cd91499bc5908 100644 (file)
@@ -1,5 +1,5 @@
 /* rescoff.c -- read and write resources in Windows COFF files.
-   Copyright (C) 1997-2015 Free Software Foundation, Inc.
+   Copyright (C) 1997-2018 Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Cygnus Support.
    Rewritten by Kai Tietz, Onevision.
 
@@ -164,7 +164,7 @@ read_coff_rsrc (const char *filename, const char *target)
      this will have to be cleaned up.  */
 
   ret = read_coff_res_dir (&wrbfd, data, &flaginfo, (const rc_res_id *) NULL, 0);
-  
+
   bfd_close (abfd);
 
   return ret;
@@ -249,7 +249,7 @@ read_coff_res_dir (windres_bfd *wrbfd, const bfd_byte *data,
       for (j = 0; j < length; j++)
        {
          /* PR 17512: file: 05dc4a16.  */
-         if (length < 0 || ers >= (bfd_byte *) ere || ers + j * 2 + 4 >= (bfd_byte *) ere)
+         if (length < 0 || ers >= flaginfo->data_end || ers + j * 2 + 4 >= flaginfo->data_end)
            overrun (flaginfo, _("resource name"));
          re->id.u.n.name[j] = windres_get_16 (wrbfd, ers + j * 2 + 2, 2);
        }
This page took 0.027399 seconds and 4 git commands to generate.