Skip to content
Snippets Groups Projects
Commit 6e3759fe authored by BenceJanosSzabo's avatar BenceJanosSzabo
Browse files

Fixed uninitialised value when reading CaseFolding.txt


Change-Id: Ifbe5a21678c24ff679e80e8d0381d46457a6491a
Signed-off-by: default avatarBenceJanosSzabo <bence.janos.szabo@ericsson.com>
parent df39b4c8
No related branches found
No related tags found
No related merge requests found
......@@ -107,12 +107,16 @@ UnicharPattern::UnicharPattern() : mappings_head(NULL)
// read one line at a time
char line[1024];
while (fgets(line, sizeof(line), fp) != NULL) {
// skip empty lines
if (strcmp(line,"\n") == 0 || strcmp(line,"\r\n") == 0) {
continue;
}
// ignore everything after the '#' (this is the 'comment' indicator)
char* line_end = strchr(line, '#');
if (line_end != NULL) {
*line_end = '\0';
}
//TODO:Valgrind reports uninitialized value coming form here to remove_spaces
// each column ends with a ';', use that as the separator for strtok
char* from_str = remove_spaces(strtok(line, ";"));
size_t from_str_len = from_str != NULL ? strlen(from_str) : 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment