Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 4e6e422

Browse files
committed
Merge tag 'staging-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging driver fixes from Greg KH: "Here are two small staging driver fixes for the vc04_services driver that resolve reported problems: - strncpy fix for information leak - another information leak discovered by the previous strncpy fix Both of these have been in linux-next all this past week with no reported issues" * tag 'staging-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: vc04_services: fix information leak in create_component() staging: vc04_services: changen strncpy() to strscpy_pad()
2 parents 486291a + f37e76a commit 4e6e422

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -937,8 +937,9 @@ static int create_component(struct vchiq_mmal_instance *instance,
937937
/* build component create message */
938938
m.h.type = MMAL_MSG_TYPE_COMPONENT_CREATE;
939939
m.u.component_create.client_component = component->client_component;
940-
strncpy(m.u.component_create.name, name,
941-
sizeof(m.u.component_create.name));
940+
strscpy_pad(m.u.component_create.name, name,
941+
sizeof(m.u.component_create.name));
942+
m.u.component_create.pid = 0;
942943

943944
ret = send_synchronous_mmal_msg(instance, &m,
944945
sizeof(m.u.component_create),

0 commit comments

Comments
 (0)