projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
479acb9
)
drm/nouveau: refactor deprecated strcpy
author
Madhur Kumar
<madhurkumar004@gmail.com>
Thu, 4 Dec 2025 12:08:22 +0000
(17:38 +0530)
committer
Lyude Paul
<lyude@redhat.com>
Fri, 5 Dec 2025 19:58:53 +0000
(14:58 -0500)
strcpy() has been deprecated because it performs no bounds checking on the
destination buffer, which can lead to buffer overflows. Use the safer
strscpy() instead.
Signed-off-by: Madhur Kumar <madhurkumar004@gmail.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Fixes:
15a996bbb697
("drm/nouveau: assign fence_chan->name correctly")
Signed-off-by: Lyude Paul <lyude@redhat.com>
Link:
https://patch.msgid.link/20251204120822.17502-1-madhurkumar004@gmail.com
drivers/gpu/drm/nouveau/nouveau_fence.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/nouveau/nouveau_fence.c
b/drivers/gpu/drm/nouveau/nouveau_fence.c
index
869d433
..
4a193b7
100644
(file)
--- a/
drivers/gpu/drm/nouveau/nouveau_fence.c
+++ b/
drivers/gpu/drm/nouveau/nouveau_fence.c
@@
-183,11
+183,11
@@
nouveau_fence_context_new(struct nouveau_channel *chan, struct nouveau_fence_cha
fctx->context = drm->runl[chan->runlist].context_base + chan->chid;
if (chan == drm->cechan)
- strcpy(fctx->name, "copy engine channel");
+ str
s
cpy(fctx->name, "copy engine channel");
else if (chan == drm->channel)
- strcpy(fctx->name, "generic kernel channel");
+ str
s
cpy(fctx->name, "generic kernel channel");
else
- strcpy(fctx->name, cli->name);
+ str
s
cpy(fctx->name, cli->name);
kref_init(&fctx->fence_ref);
if (!priv->uevent)