[vlc-devel] [PATCH] resource: fix uninitialized pointer dereference
Thomas Guillem
thomas at gllm.fr
Thu May 9 15:36:25 CEST 2019
That is why we need systematic reviews. It is the second time I apply this patch.
The warning "../../src/input/resource.c:409:9: warning: ‘vout’ may be used uninitialized in this function [-Wmaybe-uninitialized]
" was quite obvious.
On Thu, May 9, 2019, at 15:34, Thomas Guillem wrote:
> This commit fixes a regression from a1924dbd8bb3e3c146ef150191dcf8ffa0be0a59
> that (unintentionally) reverted 3505ecb9d6b3edb4e68322cedb3dfe9ee895ff5b
> ---
> src/input/resource.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/input/resource.c b/src/input/resource.c
> index 56ce537753..80d27f462c 100644
> --- a/src/input/resource.c
> +++ b/src/input/resource.c
> @@ -357,9 +357,9 @@ vout_thread_t
> *input_resource_GetVout(input_resource_t *p_resource,
>
> if (vout_Request(cfg, p_resource->p_input)) {
> if (p_resource->p_vout_free == NULL && p_resource->i_vout == 0)
> - p_resource->p_vout_free = vout;
> + p_resource->p_vout_free = cfg->vout;
> else
> - vout_Close(vout);
> + vout_Close(cfg->vout);
> vlc_mutex_unlock(&p_resource->lock);
> return NULL;
> }
> --
> 2.20.1
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list