|
From: | Paul Eggert |
Subject: | Re: [PATCH v3 4/6] stdlib: Sync canonicalize with gnulib [BZ #10635] [BZ #26592] [BZ #26341] [BZ #24970] |
Date: | Fri, 8 Jan 2021 17:24:14 -0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 |
On 1/4/21 4:52 AM, Adhemerval Zanella wrote:
The extra comparison might avoid the scratch_buffer resize that will fail (since malloc will fail to try allocate PTRDIFF_MAX object), but it will be used only when such objects are provided (which depending of the system should not happen).
As you say, that comparison isn't needed for glibc. It's also not needed on non-glibc because Gnulib prevents malloc etc. from succeeding on sizes greater than PTRDIFF_MAX. So we should be OK here.
[Prev in Thread] | Current Thread | [Next in Thread] |