speechd-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Fix an incorrect NULL pointer check in the ibmtts module.


From: Halim Sahin
Subject: [PATCH] Fix an incorrect NULL pointer check in the ibmtts module.
Date: Sat, 9 Apr 2011 08:32:22 +0200

Hi,
It seems nobody has reviewed this patch yet?

This  patch fixes a critical bug so it should be pushed.

The patch works here and fixes the ibmtts's audio output.

BR.
Halim


On Thu, Mar 31, 2011 at 04:27:33PM +0000, Christopher Brannon wrote:
> We were checking for a NULL pointer in the wrong place in
> ibmtts_send_to_audio.
> ---
>  src/modules/ibmtts.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/src/modules/ibmtts.c b/src/modules/ibmtts.c
> index c307b95..55955bf 100644
> --- a/src/modules/ibmtts.c
> +++ b/src/modules/ibmtts.c
> @@ -1493,8 +1493,6 @@ ibmtts_send_to_audio(TPlaybackQueueEntry * 
> playback_queue_entry)
>  #endif
>       int ret;
>  
> -     if (track.samples == NULL)
> -             return IBMTTS_TRUE;
>  
>       track.num_samples = playback_queue_entry->data.audio.num_samples;
>       track.num_channels = 1;
> @@ -1502,6 +1500,9 @@ ibmtts_send_to_audio(TPlaybackQueueEntry * 
> playback_queue_entry)
>       track.bits = 16;
>       track.samples = playback_queue_entry->data.audio.audio_chunk;
>  
> +     if (track.samples == NULL)
> +             return IBMTTS_TRUE;
> +
>       DBG("Ibmtts: Sending %i samples to audio.", track.num_samples);
>       ret = module_tts_output(track, format);
>       if (ret < 0) {
> -- 
> 1.7.3.4
> 
> 
> _______________________________________________
> Speechd mailing list
> Speechd at lists.freebsoft.org
> http://lists.freebsoft.org/mailman/listinfo/speechd

-- 
Halim Sahin
E-Mail:                         
halim.sahin (at) t-online.de



reply via email to

[Prev in Thread] Current Thread [Next in Thread]