diff options
author | Len Baker <len.baker@gmx.com> | 2021-07-18 15:12:17 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-07-29 17:26:30 +0200 |
commit | 7aaabc37943f383ec8d8e51b7fc43ae60fac4206 (patch) | |
tree | 0c39d304345edb311d20e3b889b51b336e2523f1 /drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | |
parent | 041878d46ba37157814e6b650c9eff6efa7070d6 (diff) | |
download | linux-7aaabc37943f383ec8d8e51b7fc43ae60fac4206.tar.bz2 |
staging/vc04_services: Remove all strcpy() uses in favor of strscpy()
strcpy() performs no bounds checking on the destination buffer. This
could result in linear overflows beyond the end of the buffer, leading
to all kinds of misbehaviors. The safe replacement is strscpy().
Signed-off-by: Len Baker <len.baker@gmx.com>
Link: https://lore.kernel.org/r/20210718131217.3806-1-len.baker@gmx.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c')
-rw-r--r-- | drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c index 4f43e4213bfe..9429b8a642fb 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -3716,7 +3716,7 @@ int vchiq_dump_service_state(void *dump_context, struct vchiq_service *service) sizeof(remoteport) - len2, " (client %x)", service->client_id); } else { - strcpy(remoteport, "n/a"); + strscpy(remoteport, "n/a", sizeof(remoteport)); } len += scnprintf(buf + len, sizeof(buf) - len, |