From: tom st denis <tomstdenis@yahoo.com>
To: linux-kernel@vger.kernel.org
Subject: proc_misc.c comments
Date: Wed, 23 Jun 2004 06:33:09 -0700 (PDT) [thread overview]
Message-ID: <20040623133309.43964.qmail@web41101.mail.yahoo.com> (raw)
I was toying around with the idea of making /proc/meminfo use KiB as
the unit instead of KB [just something to waste 10 mins] when I noticed
that you guys have prototypes like
static int meminfo_read_proc(char *page, char **start, off_t off,
int count, int *eof, void *data)
Then do things like
len = sprintf(page,
Wouldn't it be safer to pass the size of "page" into the function and
use snprintf to prevent any possible buffer overflows?
Sure right now it's not a problem but it would make the code easier to
review, say when someone wants to add a /proc/thingymagingy later on in
the future.
I'm still a kernel newbie so I'll defer the coding work to other people
;-) Just thought I would point that out.
Tom
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail
next reply other threads:[~2004-06-23 13:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-23 13:33 tom st denis [this message]
2004-06-23 14:01 ` 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=20040623133309.43964.qmail@web41101.mail.yahoo.com \
--to=tomstdenis@yahoo.com \
--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
all inboxes | Powered by JetHome®