This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [BUILDROBOT, PATCH] Fix sign-compare in dwarf.c


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]