vlc | branch: master | Francois Cartegnie <[email protected]> | Fri Nov  6 
13:58:42 2020 +0100| [56c05e47af966d53cb9d32d0b8d7c33f11cd6fc6] | committer: 
Francois Cartegnie

src: input: fix read overflow in timeshift

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=56c05e47af966d53cb9d32d0b8d7c33f11cd6fc6
---

 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 )
     {

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to