This is the mail archive of the
mailing list for the glibc project.
Re: [RFC] signal-safe fprintf?
On Thu, Mar 7, 2013 at 10:53 AM, Siddhesh Poyarekar
> On 7 March 2013 22:39, Andrew Hunter <firstname.lastname@example.org> wrote:
>> This is true, but as pointed out downthread snprintf is (I think) not
>> vulnerable to this, though I could be misinterpreting how the
>> fake-files work.
> Not snprintf, but the rest of *printf would be vulnerable to this,
> i.e. anything that doesn't do fake-files. snprintf will have another
> problem. Since the fake-files are different, there would be
> corruption of output since the read/write pointers in the buffers
> within the fake-files will not be synced. It will most likely only
> lead to jumbled up output though, not anything serious.
I'm sorry, I don't follow you--snprintf creates a single use fake file
that's only written to by the single call to vfprintf. How does that