public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ftp.linux.org.uk>
To: mahamuni ashish <ash_lkp@yahoo.co.in>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Floating Point Issue
Date: Thu, 27 Sep 2007 16:29:38 +0100	[thread overview]
Message-ID: <20070927152938.GV8181@ftp.linux.org.uk> (raw)
In-Reply-To: <109515.18343.qm@web7805.mail.in.yahoo.com>

On Thu, Sep 27, 2007 at 12:41:41PM +0100, mahamuni ashish wrote:
> I have small code....
> 
> #include <stdio.h>
> #include <string.h>
> 
> int main()
> {
> float f= 1256.35;
> char ch[4];
> 
> printf("\n1. f : %f",f);
> memset(ch,'\0',strlen(ch) );

strlen() applied to uninitialized array => undefined behaviour.

What does that have to do with the kernel, anyway?

  parent reply	other threads:[~2007-09-27 15:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-27 11:41 Floating Point Issue mahamuni ashish
2007-09-27 15:17 ` Jan Engelhardt
2007-09-28  2:32   ` WANG Cong
2007-09-27 15:21 ` Xavier Bestel
2007-09-27 15:29 ` Al Viro [this message]
2007-09-27 18:25 ` Trond Myklebust
2007-09-27 20:53 ` linux-os (Dick Johnson)
2007-09-27 21:01   ` Jan Engelhardt
2007-09-28  8:31 ` Bernd Petrovitsch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070927152938.GV8181@ftp.linux.org.uk \
    --to=viro@ftp.linux.org.uk \
    --cc=ash_lkp@yahoo.co.in \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox