[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: [PATCH] iphlpapi: Cast caddr_t to char* before doing pointer arithmetic
From:       Simon Richter <Simon.Richter () hogyros ! de>
Date:       2018-06-28 13:57:55
Message-ID: 20180628135755.GA5306 () psi5 ! com
[Download RAW message or body]

Hi,

On Thu, Jun 28, 2018 at 01:54:45PM +0200, Alex Henrie wrote:

> -      while (ifPtr && ifPtr < ifc->ifc_buf + ifc->ifc_len) {
> +      while (ifPtr && (char *)ifPtr < ifc->ifc_buf + ifc->ifc_len) {

Quick question: what if ifc->ifc_len == 1 ?

In this case, can I read the length field of the record, or would that
bring me out of bounds here?

   Simon



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic