[vlc-devel] [PATCH 1/2] aout: use vlc_atomic_rc_t

Rémi Denis-Courmont remi at remlab.net
Fri Feb 21 18:00:29 CET 2020


Le perjantaina 21. helmikuuta 2020, 16.14.34 EET 
quentin.chateau at deepskycorp.com a écrit :
> From: Quentin Chateau <quentin.chateau at deepskycorp.com>
> 
> ---
>  src/audio_output/aout_internal.h | 3 ++-
>  src/audio_output/output.c        | 7 ++++---
>  2 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/src/audio_output/aout_internal.h
> b/src/audio_output/aout_internal.h index 57b4f3264d..8b563012e2 100644
> --- a/src/audio_output/aout_internal.h
> +++ b/src/audio_output/aout_internal.h
> @@ -25,6 +25,7 @@
> 
>  # include <stdatomic.h>
> 
> +# include <vlc_atomic.h>
>  # include <vlc_viewpoint.h>
>  # include "../clock/clock.h"
> 
> @@ -97,7 +98,7 @@ typedef struct
>      atomic_uint buffers_played;
>      atomic_uchar restart;
> 
> -    atomic_uintptr_t refs;
> +    vlc_atomic_rc_t rc;

This causes a potential unchecked overflow of the counter.

No thanks.

-- 
雷米‧德尼-库尔蒙
http://www.remlab.net/





More information about the vlc-devel mailing list