glibc segfault on "special" long double values is _ok_!?

Jan-Benedict Glaw jbglaw@lug-owl.de
Thu Jun 7 10:10:00 GMT 2007


On Wed, 2007-06-06 22:44:17 +0100, James Youngman <jay@gnu.org> wrote:
> If I read a stream of data (from a file, a network socket, etc.) which
> is supposed to contain valid floating-point data, it is reasonable for
> a program to print it.  Especially so if the printing I am doing is a

Data you didn't compute yourself isn't supposed to contain anything
known. Each and every bit may contain something you didn't expect,
that's why you have to do input checking.

The most you can do with your externally fetched data is printing it
out, byte by byte, in hex. "Assuming" that this'll make up any
well-known data formats is just asking for trouble.

MfG, JBG

-- 
      Jan-Benedict Glaw      jbglaw@lug-owl.de              +49-172-7608481
Signature of:               http://www.eyrie.org/~eagle/faqs/questions.html
the second  :
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20070607/34f0ac7d/attachment.sig>


More information about the Libc-alpha mailing list