Skip to content

Commit

Permalink
fix a buffer overflow on DRM mode name (#16245)
Browse files Browse the repository at this point in the history
  • Loading branch information
substring authored Feb 18, 2024
1 parent 6e6a4d8 commit c264c5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gfx/drivers_context/drm_ctx.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ bool gfx_ctx_drm_get_mode_from_video_state(drmModeModeInfoPtr modeInfo)
modeInfo->vrefresh = video_st->crt_switch_st.vrefresh;
modeInfo->type = DRM_MODE_TYPE_USERDEF;

snprintf(modeInfo->name, 45, "RetroArch_CRT-%dx%d@%.02f%s"
snprintf(modeInfo->name, DRM_DISPLAY_MODE_LEN, "RetroArch_CRT-%dx%d@%.02f%s"
, video_st->crt_switch_st.hdisplay
, video_st->crt_switch_st.vdisplay
, mode_vrefresh(modeInfo)
Expand Down

0 comments on commit c264c5a

Please sign in to comment.