diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-04-26 07:51:51 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-29 17:41:34 -0400 |
commit | cebfadff4a5c877c524ae6014613edab9f50a2a9 (patch) | |
tree | f6cf91e323d4d9a90ba60868aceaf601796ff8e6 /drivers/media/video/ivtv/ivtv-cards.c | |
parent | ecfcc83b8d6ff8ac65b072b309a1774ca52d955e (diff) |
V4L/DVB (7756): ivtv: use strlcpy instead of strcpy
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-cards.c')
-rw-r--r-- | drivers/media/video/ivtv/ivtv-cards.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/media/video/ivtv/ivtv-cards.c b/drivers/media/video/ivtv/ivtv-cards.c index bf9b32a6c1ad..33a2f58f66d7 100644 --- a/drivers/media/video/ivtv/ivtv-cards.c +++ b/drivers/media/video/ivtv/ivtv-cards.c | |||
@@ -1122,7 +1122,8 @@ int ivtv_get_input(struct ivtv *itv, u16 index, struct v4l2_input *input) | |||
1122 | if (index >= itv->nof_inputs) | 1122 | if (index >= itv->nof_inputs) |
1123 | return -EINVAL; | 1123 | return -EINVAL; |
1124 | input->index = index; | 1124 | input->index = index; |
1125 | strcpy(input->name, input_strs[card_input->video_type - 1]); | 1125 | strlcpy(input->name, input_strs[card_input->video_type - 1], |
1126 | sizeof(input->name)); | ||
1126 | input->type = (card_input->video_type == IVTV_CARD_INPUT_VID_TUNER ? | 1127 | input->type = (card_input->video_type == IVTV_CARD_INPUT_VID_TUNER ? |
1127 | V4L2_INPUT_TYPE_TUNER : V4L2_INPUT_TYPE_CAMERA); | 1128 | V4L2_INPUT_TYPE_TUNER : V4L2_INPUT_TYPE_CAMERA); |
1128 | input->audioset = (1 << itv->nof_audio_inputs) - 1; | 1129 | input->audioset = (1 << itv->nof_audio_inputs) - 1; |
@@ -1139,7 +1140,7 @@ int ivtv_get_output(struct ivtv *itv, u16 index, struct v4l2_output *output) | |||
1139 | if (index >= itv->card->nof_outputs) | 1140 | if (index >= itv->card->nof_outputs) |
1140 | return -EINVAL; | 1141 | return -EINVAL; |
1141 | output->index = index; | 1142 | output->index = index; |
1142 | strcpy(output->name, card_output->name); | 1143 | strlcpy(output->name, card_output->name, sizeof(output->name)); |
1143 | output->type = V4L2_OUTPUT_TYPE_ANALOG; | 1144 | output->type = V4L2_OUTPUT_TYPE_ANALOG; |
1144 | output->audioset = 1; | 1145 | output->audioset = 1; |
1145 | output->std = V4L2_STD_ALL; | 1146 | output->std = V4L2_STD_ALL; |
@@ -1158,7 +1159,8 @@ int ivtv_get_audio_input(struct ivtv *itv, u16 index, struct v4l2_audio *audio) | |||
1158 | memset(audio, 0, sizeof(*audio)); | 1159 | memset(audio, 0, sizeof(*audio)); |
1159 | if (index >= itv->nof_audio_inputs) | 1160 | if (index >= itv->nof_audio_inputs) |
1160 | return -EINVAL; | 1161 | return -EINVAL; |
1161 | strcpy(audio->name, input_strs[aud_input->audio_type - 1]); | 1162 | strlcpy(audio->name, input_strs[aud_input->audio_type - 1], |
1163 | sizeof(audio->name)); | ||
1162 | audio->index = index; | 1164 | audio->index = index; |
1163 | audio->capability = V4L2_AUDCAP_STEREO; | 1165 | audio->capability = V4L2_AUDCAP_STEREO; |
1164 | return 0; | 1166 | return 0; |
@@ -1169,6 +1171,6 @@ int ivtv_get_audio_output(struct ivtv *itv, u16 index, struct v4l2_audioout *aud | |||
1169 | memset(aud_output, 0, sizeof(*aud_output)); | 1171 | memset(aud_output, 0, sizeof(*aud_output)); |
1170 | if (itv->card->video_outputs == NULL || index != 0) | 1172 | if (itv->card->video_outputs == NULL || index != 0) |
1171 | return -EINVAL; | 1173 | return -EINVAL; |
1172 | strcpy(aud_output->name, "A/V Audio Out"); | 1174 | strlcpy(aud_output->name, "A/V Audio Out", sizeof(aud_output->name)); |
1173 | return 0; | 1175 | return 0; |
1174 | } | 1176 | } |