bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: canonicalize-lgpl: support paths of length > 2 GB


From: Pádraig Brady
Subject: Re: canonicalize-lgpl: support paths of length > 2 GB
Date: Sat, 15 Oct 2016 11:23:17 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

On 15/10/16 11:10, Bruno Haible wrote:
> Hi Pádraig,

> Thanks, also for the integer overflow check (useful also for the LP64
> platforms). Here is the proposed revised patch.

> -              if ((long int) (n + len) >= path_max)
> +              /* Check that n + len + 1 doesn't overflow and is <= path_max. 
> */
> +              if (n >= SIZE_MAX - len || n + len >= path_max)

+1

thanks



reply via email to

[Prev in Thread] Current Thread [Next in Thread]