[PATCH] iphlpapi: Cast caddr_t to char* before doing pointer arithmetic

Simon Richter Simon.Richter at hogyros.de
Thu Jun 28 08:57:55 CDT 2018


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



More information about the wine-devel mailing list