From: Dan Carpenter <error27@gmail.com>
To: Thomas Winischhofer <thomas@winischhofer.net>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Krzysztof Helt <krzysztof.h1@wp.pl>,
Roel Kluin <roel.kluin@gmail.com>,
Michal Januszewski <spock@gentoo.org>,
Wu Zhangjin <wuzhangjin@gmail.com>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] sis: strcpy() => strlcpy()
Date: Mon, 22 Mar 2010 15:09:18 +0300 [thread overview]
Message-ID: <20100322120918.GG21571@bicker> (raw)
These are different size buffers (40 chars vs 16), we may as well be
cautious.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/video/sis/sis_main.c b/drivers/video/sis/sis_main.c
index a531a0f..559bf17 100644
--- a/drivers/video/sis/sis_main.c
+++ b/drivers/video/sis/sis_main.c
@@ -1845,7 +1845,7 @@ sisfb_get_fix(struct fb_fix_screeninfo *fix, int con, struct fb_info *info)
memset(fix, 0, sizeof(struct fb_fix_screeninfo));
- strcpy(fix->id, ivideo->myid);
+ strlcpy(fix->id, ivideo->myid, sizeof(fix->id));
mutex_lock(&info->mm_lock);
fix->smem_start = ivideo->video_base + ivideo->video_offset;
reply other threads:[~2010-03-22 12:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20100322120918.GG21571@bicker \
--to=error27@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=krzysztof.h1@wp.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=roel.kluin@gmail.com \
--cc=spock@gentoo.org \
--cc=thomas@winischhofer.net \
--cc=wuzhangjin@gmail.com \
/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