From owner-freebsd-bugs Sun Sep 12 17:49:35 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from activestate.com (maul.activestate.com [199.60.48.19]) by hub.freebsd.org (Postfix) with ESMTP id 650F614BE9 for ; Sun, 12 Sep 1999 17:49:32 -0700 (PDT) (envelope-from gsar@activestate.com) Received: from localhost (IDENT:gsar@localhost [127.0.0.1]) by activestate.com (8.9.3/8.9.3) with ESMTP id RAA28751; Sun, 12 Sep 1999 17:52:54 -0700 Message-Id: <199909130052.RAA28751@activestate.com> To: Ilya Zakharevich Cc: gsar@activestate.com (Gurusamy Sarathy), muir@idiom.com (David Muir Sharnoff), perl5-porters@perl.org, freebsd-bugs@freebsd.org Subject: Re: [ID 19990727.005] sprintf considered insecure? In-reply-to: Your message of "Sun, 12 Sep 1999 18:10:33 EDT." <199909122210.SAA16630@monk.mps.ohio-state.edu> Date: Sun, 12 Sep 1999 17:52:54 -0700 From: Gurusamy Sarathy Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Sun, 12 Sep 1999 18:10:33 EDT, Ilya Zakharevich wrote: >Gurusamy Sarathy writes: >> ==== //depot/perl/perl.c#166 (text) ==== >> Index: perl/perl.c >> --- perl/perl.c.~1~ Sun Sep 12 13:09:05 1999 >> +++ perl/perl.c Sun Sep 12 13:09:05 1999 >> @@ -409,6 +409,11 @@ [...] >Can you reconfigure your diff-extractor to give diff the options -p? No (unfortunately). The diff is handled internally in the perforce server. One *could* write a script to fetch the files before and after and do the diff using GNU diff (Porting/p4d2p would be the place to patch, if you're feeling up to it). It would run much slower, though, because you will have to fetch the entire file twice (as opposed to fetching the very fast server diff just once). Which probably means I won't use it anyway. ;-) >> +To cope with broken systems that allow the standard locales to be >> +overridden by malicious users, the return value may be tainted >> +if any of the floating point formats are used and the conversion >> +yields something that doesn't look like a normal C-locale floating >> +point number. This happens regardless of whether C is >> +in effect or not. > >Why this in 'no locale' situation? Do you do the same for the >NOK===>POK conversions? No, but I'm glad you asked. Perhaps Chip can tell us why only s?printf() are treated this way. Frankly, I'd rather Perl didn't consider the C/POSIX locale untrustworthy, but this behavior has been there since 5.004. Whatever the reasons, it appears NV->PV conversions had a better argument for the behavior than s?printf() because the latter is always forced to be in the C/POSIX locale while the former is not. Sarathy gsar@activestate.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message