Skip to content

Commit

Permalink
Fixed potential buffer overflow
Browse files Browse the repository at this point in the history
(cherry picked from commit 6aab5a0)
  • Loading branch information
slouken committed Dec 3, 2024
1 parent 8d00ca0 commit e539135
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 @@ -96,7 +96,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 e539135

Please sign in to comment.