[vlc-devel] [PATCH] stream: error out on a failed conversion
Thomas Guillem
thomas at gllm.fr
Fri Jun 23 17:30:18 CEST 2017
On Fri, Jun 23, 2017, at 17:28, Shaleen Jain wrote:
> ---
> src/input/stream.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/input/stream.c b/src/input/stream.c
> index affc7b2c0d..a7ea3bfa43 100644
> --- a/src/input/stream.c
> +++ b/src/input/stream.c
> @@ -327,10 +327,12 @@ char *vlc_stream_ReadLine( stream_t *s )
> p_in = p_line;
> p_out = psz_new_line;
>
> - if( vlc_iconv( priv->text.conv, &p_in, &i_in, &p_out, &i_out
> ) == (size_t)-1 )
> + if( priv->text.conv == (vlc_iconv_t)-1 ||
> + vlc_iconv( priv->text.conv, &p_in, &i_in, &p_out,
> &i_out ) == (size_t)-1 )
> {
> msg_Err( s, "conversion error: %s", vlc_strerror_c(
> errno ) );
> msg_Dbg( s, "original: %d, in %zu, out %zu", i_line,
> i_in, i_out );
> + goto error;
> }
> free( p_line );
> p_line = psz_new_line;
Looks good to me.
> --
> 2.13.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