From 398201b57015e1698fad25d9586b97c88936947a Mon Sep 17 00:00:00 2001 From: Narayan Kamath Date: Mon, 27 Jun 2011 16:38:31 +0100 Subject: Fix a pico bug. This is one of 10 million errors (really) reported by valgrind. I verified that some of them are OK, but it's probably not worth going through the rest. I expect most of those are just optimized code and fancy bit trickery. Change-Id: I3b8675ec8267691a5e6127a8e03239547107053e --- pico/tts/com_svox_picottsengine.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pico/tts/com_svox_picottsengine.cpp b/pico/tts/com_svox_picottsengine.cpp index bafd300..2370964 100644 --- a/pico/tts/com_svox_picottsengine.cpp +++ b/pico/tts/com_svox_picottsengine.cpp @@ -1073,7 +1073,7 @@ tts_result TtsEngine::init( synthDoneCB_t synthDoneCBPtr, const char *config ) strcpy((char*)pico_alt_lingware_path, config); LOGV("Alternative lingware path %s", pico_alt_lingware_path); } else { - pico_alt_lingware_path = (char*)malloc(strlen(PICO_LINGWARE_PATH)); + pico_alt_lingware_path = (char*)malloc(strlen(PICO_LINGWARE_PATH) + 1); strcpy((char*)pico_alt_lingware_path, PICO_LINGWARE_PATH); LOGV("Using predefined lingware path %s", pico_alt_lingware_path); } @@ -1659,4 +1659,3 @@ TtsEngine * getTtsEngine( void ) #ifdef __cplusplus } #endif - -- cgit v1.1