From owner-freebsd-bugs Sun Jun 9 02:25:54 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id CAA18783 for bugs-outgoing; Sun, 9 Jun 1996 02:25:54 -0700 (PDT) Received: from sbstark.cs.sunysb.edu (sbstark.cs.sunysb.edu [130.245.1.47]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id CAA18762 for ; Sun, 9 Jun 1996 02:25:50 -0700 (PDT) Received: (from root@localhost) by sbstark.cs.sunysb.edu (8.6.12/8.6.9) with UUCP id FAA07124; Sun, 9 Jun 1996 05:24:14 -0400 Received: (from gene@localhost) by starkhome.cs.sunysb.edu (8.6.11/8.6.9) id FAA10047; Sun, 9 Jun 1996 05:25:05 -0400 Date: Sun, 9 Jun 1996 05:25:05 -0400 From: Gene Stark Message-Id: <199606090925.FAA10047@starkhome.cs.sunysb.edu> To: ac199@freenet.hamilton.on.ca Cc: freebsd-bugs@freefall.freebsd.org In-reply-to: Tim Vanderhoek's message of Sat, 8 Jun 1996 20:52:03 -0400 (EDT) Subject: docs/1303: printf(3) manpage lies patently References: <4pdnb5$8aq@starkhome.cs.sunysb.edu> Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >"Because sprintf() and vsprintf() assume an infinitely long string, >callers must be careful not to overflow the actual space; this is often >impossible to assure." > > The last statement in the quote is a patent lie, as the >following code will readily demonstrate. It is never impossible >to assure that sprintf() and vsprintf() do not overflow the actual >space available to them. Your code is very clever and all, but you run the risk of deadlock when a process sends data to itself over a pipe. - Gene Stark