summaryrefslogtreecommitdiffstats
path: root/pico
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2011-06-27 16:38:31 +0100
committerNarayan Kamath <narayan@google.com>2011-06-27 16:44:18 +0100
commit398201b57015e1698fad25d9586b97c88936947a (patch)
treeb5ccda370b195f71cd831715088a1fd8c692fe7c /pico
parent8b96d41f190527187d2ab1cd33f9d0fe02c08386 (diff)
downloadexternal_svox-398201b57015e1698fad25d9586b97c88936947a.zip
external_svox-398201b57015e1698fad25d9586b97c88936947a.tar.gz
external_svox-398201b57015e1698fad25d9586b97c88936947a.tar.bz2
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
Diffstat (limited to 'pico')
-rw-r--r--pico/tts/com_svox_picottsengine.cpp3
1 files changed, 1 insertions, 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
-