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)
(cherry picked from commit e539135)
  • Loading branch information
slouken committed Dec 3, 2024
1 parent 5418740 commit 6d9ab4c
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 6d9ab4c

Please sign in to comment.