Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/kmi/flatfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ static int convert_option(const unsigned char * const path, unsigned char **dk_l
unsigned int num_of_lines = 0; /* number of lines which has a valid info */
for (num_of_lines = 0; fgets(buf, sizeof(buf), fp); ++num_of_lines) {
const int i = num_of_lines % 2;
if (! strncmp(buf, tag[i].name, strlen(tag[i].name))) {
if (! strncmp(buf, tag[i].name, strlen(tag[i].name)) && strlen(buf) >= strlen(tag[i].name)) {
if (buf[strlen(buf) - 1] == '\n')
buf[strlen(buf) - 1] = '\0';

Expand Down
Loading
Loading