mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-27 09:53:47 -07:00
internal: replace unsafe strcpy with snprintf (#11128)
This commit is contained in:
committed by
GitHub
parent
a3d59b525b
commit
503fc458d8
@@ -107,8 +107,7 @@ static int openRenderNode(int drmFd) {
|
||||
Debug::log(LOG, "DRM dev versionName", render_version->name);
|
||||
if (strcmp(render_version->name, "evdi") == 0) {
|
||||
free(renderName);
|
||||
renderName = (char*)malloc(sizeof(char) * 15);
|
||||
strcpy(renderName, "/dev/dri/card0");
|
||||
renderName = strdup("/dev/dri/card0");
|
||||
}
|
||||
drmFreeVersion(render_version);
|
||||
}
|
||||
|
Reference in New Issue
Block a user