[vlc-commits] [Git][videolan/vlc][master] 2 commits: decklink: fix use after free
Rémi Denis-Courmont (@Courmisch)
gitlab at videolan.org
Sat Sep 3 09:27:38 UTC 2022
Rémi Denis-Courmont pushed to branch master at VideoLAN / VLC
Commits:
4d5914d0 by Rémi Denis-Courmont at 2022-09-03T09:12:27+00:00
decklink: fix use after free
- - - - -
4a09b885 by Rémi Denis-Courmont at 2022-09-03T09:12:27+00:00
decklink: cut string length check
If the string has at least 5 characters, it is too long. We don't
exactly care how many characters it actually has.
- - - - -
1 changed file:
- modules/video_output/decklink.cpp
Changes:
=====================================
modules/video_output/decklink.cpp
=====================================
@@ -436,11 +436,10 @@ static int OpenDecklink(vout_display_t *vd, decklink_sys_t *sys, video_format_t
if(mode)
{
- size_t len = strlen(mode);
- if (len > 4)
+ if (strnlen(mode, 5) > 4)
{
- free(mode);
msg_Err(vd, "Invalid mode %s", mode);
+ free(mode);
goto error;
}
strncpy(wanted_mode.str, mode, 4);
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/84ef46141584b464a7c3376672cc1b2e7065340b...4a09b885e820cb7e0519994acbdbc56eabc05bf7
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/84ef46141584b464a7c3376672cc1b2e7065340b...4a09b885e820cb7e0519994acbdbc56eabc05bf7
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list