This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [BUILDROBOT, PATCH] Fix sign-compare in dwarf.c
- From: Alan Modra <amodra at gmail dot com>
- To: Jan-Benedict Glaw <jbglaw at lug-owl dot de>
- Cc: binutils at sourceware dot org, Nicholas Clifton <nickc at redhat dot com>
- Date: Wed, 19 Nov 2014 21:26:10 +1030
- Subject: Re: [BUILDROBOT, PATCH] Fix sign-compare in dwarf.c
- Authentication-results: sourceware.org; auth=none
- References: <20141118210818 dot GC8445 at lug-owl dot de>
On Tue, Nov 18, 2014 at 10:08:18PM +0100, Jan-Benedict Glaw wrote:
> - if (len == 0 || data == end || len > (end - data))
> + if (len == 0 || data == end || len > (unsigned int) (end - data))
Strictly speaking that is the wrong cast.
if (len == 0 || len > (uintptr_t) (end - data))
--
Alan Modra
Australia Development Lab, IBM