This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH v1 1/1] Fix pointer conversion.
- From: Walfred Tedeschi <walfred dot tedeschi at intel dot com>
- To: xdje42 at gmail dot com
- Cc: gdb-patches at sourceware dot org, Walfred Tedeschi <walfred dot tedeschi at intel dot com>
- Date: Tue, 17 Dec 2013 16:08:15 +0100
- Subject: [PATCH v1 1/1] Fix pointer conversion.
- Authentication-results: sourceware.org; auth=none
Pointer conversion from and to "long" is not correct. Issue was
verified while building gdb for windows under MinGW.
2013-12-17 Walfred Tedeschi <walfred.tedeschi@intel.com>
bfd/
* peXXigen.c (pe_print_rsrc): Use bfd_hostptr_t instead of long.
---
bfd/peXXigen.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c
index b720668..cca2b46 100644
--- a/bfd/peXXigen.c
+++ b/bfd/peXXigen.c
@@ -2182,7 +2182,7 @@ pe_print_rsrc (bfd * abfd, void * vfile)
{
/* Align data before continuing. */
int align = (1 << section->alignment_power) - 1;
- data = (bfd_byte *) (((long) (data + align)) & ~ align);
+ data = (bfd_byte *) (((bfd_hostptr_t) (data + align)) & ~ align);
rva_bias += data - datastart;
/* For reasons that are unclear .rsrc sections are sometimes created
--
1.8.3.2