Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 14 Feb 2018 21:07:07 +0100
From: Markus Wichmann <nullplan@....net>
To: musl@...ts.openwall.com
Subject: Re: fwrite() - possible division by zero

On Wed, Feb 14, 2018 at 02:48:14PM -0500, Andrew Bell wrote:
> Why not early return if size == 0 and avoid the call to __fwritex
> altogether?
> 

Because it's a rare corner case? Here, there's also locking correctness
to consider: fwrite() has to block until f is unlocked, irrespective of
parameters. So there's no real benefit to doing an early return.

Ciao,
Markus

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.