[vlc-devel] [PATCH] src: input: fix read overflow in timeshift

Rémi Denis-Courmont remi at remlab.net
Fri Nov 6 14:30:12 CET 2020


Probably OK

Le 6 novembre 2020 15:00:54 GMT+02:00, Francois Cartegnie <fcvlcdev at free.fr> a écrit :
>---
> 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
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel

-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20201106/f1a91e2b/attachment.html>


More information about the vlc-devel mailing list