Skip to content

Commit

Permalink
Fixed potential buffer overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Dec 3, 2024
1 parent 65c9a58 commit 6aab5a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/video/kmsdrm/SDL_kmsdrmvideo.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ static int get_driindex(void)
}

SDL_strlcpy(device + kmsdrm_dri_pathsize, kmsdrm_dri_devname,
sizeof(device) - kmsdrm_dri_devnamesize);
sizeof(device) - kmsdrm_dri_pathsize);
while((res = readdir(folder)) != NULL && available < 0) {
if (SDL_memcmp(res->d_name, kmsdrm_dri_devname,
kmsdrm_dri_devnamesize) == 0) {
Expand Down

0 comments on commit 6aab5a0

Please sign in to comment.