Received: by taz.hyperreal.com (8.8.3/V2.0) id WAA13529; Tue, 14 Jan 1997 22:20:04 -0800 (PST) Received: from scanner.worldgate.com by taz.hyperreal.com (8.8.3/V2.0) with ESMTP id WAA13504; Tue, 14 Jan 1997 22:20:00 -0800 (PST) Received: from znep.com (uucp@localhost) by scanner.worldgate.com (8.7.5/8.7.3) with UUCP id XAA23363 for new-httpd@hyperreal.com; Tue, 14 Jan 1997 23:19:58 -0700 (MST) Received: from localhost (marcs@localhost) by alive.ampr.ab.ca (8.7.5/8.7.3) with SMTP id XAA02638 for ; Tue, 14 Jan 1997 23:13:30 -0700 (MST) Date: Tue, 14 Jan 1997 23:13:29 -0700 (MST) From: Marc Slemko X-Sender: marcs@alive.ampr.ab.ca To: new-httpd@hyperreal.com Subject: Re: and now back to snprintf (fwd) In-Reply-To: <199701150218.VAA27796@shado.jaguNET.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@hyperreal.com Cough. I don't see how this works. Either you have to allocate an array of infinite length or you have to parse and modify the format string, no? A log message to errorlog when things are truncated would be cool, but could potentially cause problems where snprintf is used with the intent of truncating things in normal operation. That isn't done in the current code (because, well... nothing used snprintf...) but it could be done in the future. On Tue, 14 Jan 1997, Jim Jagielski wrote: > Marc Slemko wrote: > > > > I was planning on forwarding them... when I got around to it. > > > > I don't think there is too much that wasn't sent to the list, and some of > > it is from the same OS's, but I will forward it to you... > > > > I am not yet sure if there is a problem with the 64-bit stuff or if it is > > a problem with my test code. It could be something trivial, or it could > > be a nightmare. Worst case I guess would be that any 64-bit platforms > > without their own snprintf need to just use a wrapper around sprintf. > > Sameer has given me access to a 64-bit machine, so I'm taking a look when > > I get a chance... > > > > I also have a wrapper than I'm more comfy with using... Basically > it uses an automatic char array and uses sprintf() to there. > It then copies the real info from that array to the buffer pointed > to by snprintf(), with all needed limits, etc... I was thinking > about adding a log to error-log when buffers are overwritten. > One nice thing about this is that it uses the OS's own sprintf() > implementation which, we assume, works :) > > -- > ==================================================================== > Jim Jagielski | jaguNET Access Services > jim@jaguNET.com | http://www.jaguNET.com/ > "Not the Craw... the CRAW!" >