From: Martin Mares <mj@ucw.cz>
To: "Jörn Engel" <joern@wohnheim.fh-wedel.de>
Cc: Vojtech Pavlik <vojtech@ucw.cz>, linux-kernel@vger.kernel.org
Subject: Re: [BUG] in drivers/char/joystick/magellan.c
Date: Tue, 28 Jan 2003 18:57:57 +0100 [thread overview]
Message-ID: <20030128175757.GA22145@atrey.karlin.mff.cuni.cz> (raw)
In-Reply-To: <20030128155312.GD10685@wohnheim.fh-wedel.de>
Hi!
> Without the patch below, the \0 terminating the string is written
> anywhere. nibbles[] would be even better, I guess.
> Can you check for stupidity on my side?
As far as I remember, the ANSI C permits initialization of a char array
with a string of the same length and defines that the trailing \0 is
dropped in such cases. However, I cannot quote the right chapter and
verse by heart nor am I sure it's still permitted by C99, so better
check yourself.
Have a nice fortnight
--
Martin `MJ' Mares <mj@ucw.cz> http://atrey.karlin.mff.cuni.cz/~mj/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
return(EIEIO); /* Here-a-bug, There-a-bug... */
next prev parent reply other threads:[~2003-01-28 17:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-28 15:53 Jörn Engel
2003-01-28 15:57 ` Vojtech Pavlik
2003-01-28 15:59 ` Jörn Engel
2003-01-29 13:59 ` Horst von Brand
2003-01-28 17:57 ` Martin Mares [this message]
2003-01-28 18:10 ` Jörn Engel
2003-01-28 18:47 ` Randy.Dunlap
2003-01-28 21:03 ` Vojtech Pavlik
2003-01-29 12:25 ` Jörn Engel
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=20030128175757.GA22145@atrey.karlin.mff.cuni.cz \
--to=mj@ucw.cz \
--cc=joern@wohnheim.fh-wedel.de \
--cc=linux-kernel@vger.kernel.org \
--cc=vojtech@ucw.cz \
/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
all inboxes | Powered by JetHome®