On Sat, Feb 3, 2024 at 1:05 PM Chet Ramey wrote:
>
> On 2/2/24 6:33 PM, Grisha Levit wrote:
> > Is it necessary to check the error indicator if printf(3) just had a non-
> > negative return?
>
> I think printf is allowed to set the error flag that ferror checks even if
> it returns 0, but I could
On 2/2/24 6:33 PM, Grisha Levit wrote:
On Thu, Feb 1, 2024 at 7:41 PM Chet Ramey wrote:
On 1/22/24 9:44 PM, Grisha Levit wrote:
The size of the buffer used for printf -v is tracked in an int but this
can overflow since the buffer can be built up by multiple vsnprintf(3)
calls, each of which c
On Thu, Feb 1, 2024 at 7:41 PM Chet Ramey wrote:
>
> On 1/22/24 9:44 PM, Grisha Levit wrote:
> > The size of the buffer used for printf -v is tracked in an int but this
> > can overflow since the buffer can be built up by multiple vsnprintf(3)
> > calls, each of which can append up to INT_MAX byte
On 1/22/24 9:44 PM, Grisha Levit wrote:
The size of the buffer used for printf -v is tracked in an int but this
can overflow since the buffer can be built up by multiple vsnprintf(3)
calls, each of which can append up to INT_MAX bytes to the buffer:
Thanks for the report and patch.
Chet
--
``