diff options
author | Hans de Goede <hdegoede@redhat.com> | 2011-06-05 14:58:46 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-27 17:53:42 -0300 |
commit | e7d712cc992a3f22151f15263cbacbb2d38dd371 (patch) | |
tree | a1b417bfb6213d1f4ada160ab1cdccba489e36aa /drivers/media/video/gspca/t613.c | |
parent | 2f2ea0f3f25effeaf0d27f5aaad591281fad27e2 (diff) | |
download | talos-op-linux-e7d712cc992a3f22151f15263cbacbb2d38dd371.tar.gz talos-op-linux-e7d712cc992a3f22151f15263cbacbb2d38dd371.zip |
[media] gspca: s/strncpy/strlcpy/
Just like in userspace strncpy does not guarantee 0 termination. Use strlcpy
instead which does guarantee 0 termination.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/t613.c')
-rw-r--r-- | drivers/media/video/gspca/t613.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/gspca/t613.c b/drivers/media/video/gspca/t613.c index 7e762d551099..d1d733b9359b 100644 --- a/drivers/media/video/gspca/t613.c +++ b/drivers/media/video/gspca/t613.c @@ -1387,7 +1387,7 @@ static int sd_querymenu(struct gspca_dev *gspca_dev, return 0; case V4L2_CID_EFFECTS: if ((unsigned) menu->index < ARRAY_SIZE(effects_control)) { - strncpy((char *) menu->name, + strlcpy((char *) menu->name, effects_control[menu->index], sizeof menu->name); return 0; |