X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=MqzcWSzNahAg/vsfocfeAGk7EH00RORRrGtvo3Opc61qCk3BfwMpAzAbbHDNLZCCL7jYA+4TMYkJ0l6+3g+Q8Tr7KbMaEbqaIhjt8goknkbvfgKKbxUrecvISQAh5471dZ0IoXsmYEBC69841qnHQ/hYpIsZ/kgB/RyGrMt7Y4M= Message-ID: <2497d9a205090811344d981e1@mail.gmail.com> Date: Thu, 8 Sep 2005 14:34:38 -0400 From: Matthew Petricone To: djgpp AT delorie DOT com Subject: Re: Pb with sprintf In-Reply-To: <3oanclF4upp5U2@news.dfncis.de> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_32031_25140406.1126204478396" References: <2497d9a2050907160124a508c7 AT mail DOT gmail DOT com> <3oak7kF50c1lU2 AT news DOT dfncis DOT de> <3oanclF4upp5U2 AT news DOT dfncis DOT de> Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk ------=_Part_32031_25140406.1126204478396 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Is chaf[100] maybe really something like char *chaf; which is not really=20 malloced? or maybe freed early, that would crash. On 8 Sep 2005 11:59:17 GMT, Hans-Bernhard Broeker < broeker AT physik DOT rwth-aachen DOT de> wrote: >=20 > Joe Wright wrote: >=20 > > What could sprintf() do with malloc()? >=20 > Construct itself a temporary buffer to work in --- the output buffer > may not be large enough. >=20 > If sprintf() were a standalone "real" function that does all the work > itself, it probably wouldn't need that. But in modern C runtimes, > sprintf() may well be a specialization of vsnprintf(), which may a > need a buffer to do its job. Or sprintf() could be implemented via an > in-memory pseudo file, i.e. it may need to construct a FILE * to pass > to the underlying generic routines. >=20 > -- > Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) > Even if all the snow were burnt, ashes would remain. > ------=_Part_32031_25140406.1126204478396 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Is chaf[100] maybe really something like char *chaf; which is not really ma= lloced?  or maybe freed early, that would crash.


------=_Part_32031_25140406.1126204478396--