From: Stefan Sperling Subject: Re: Only use string literals as format strings for dprintf() To: "Todd C. Miller" Cc: Christian Weisgerber , gameoftrees@openbsd.org Date: Thu, 10 Sep 2020 22:19:12 +0200 On Thu, Sep 10, 2020 at 01:15:35PM -0600, Todd C. Miller wrote: > On Thu, 10 Sep 2020 20:29:15 +0200, Christian Weisgerber wrote: > > > Only use string literals as format strings for dprintf(). > > I don't understand why this doesn't just use write(2). > > Perhaps it originally used dprintf() but was converted to asprintf() > and the dprintf() just never got converted to a write()? I believe those dprintf() originally arrived in a patch written by jcs during g2k19. And I agree that write(2) would be a better choice.