[vlc-devel] [PATCH] src: input: fix read overflow in timeshift
Francois Cartegnie
fcvlcdev at free.fr
Fri Nov 6 14:00:54 CET 2020
---
src/input/es_out_timeshift.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/input/es_out_timeshift.c b/src/input/es_out_timeshift.c
index 8ffa1ea400..3239e8e9c2 100644
--- a/src/input/es_out_timeshift.c
+++ b/src/input/es_out_timeshift.c
@@ -1328,7 +1328,8 @@ static bool TsStorageIsEmpty( ts_storage_t *p_storage )
static void TsStoragePushCmd( ts_storage_t *p_storage, const ts_cmd_t *p_cmd, bool b_flush )
{
assert( !TsStorageIsFull( p_storage, p_cmd ) );
- ts_cmd_t cmd = *p_cmd;
+ ts_cmd_t cmd;
+ memcpy(&cmd, p_cmd, TsStorageSizeofCommand[p_cmd->header.i_type]);
if( cmd.header.i_type == C_SEND )
{
--
2.26.2
More information about the vlc-devel
mailing list