Merge pull request #2410 from heuripedes/master

Content scanning fixes
This commit is contained in:
Twinaphex 2015-11-17 00:56:39 +01:00
commit 6f13733184
2 changed files with 4 additions and 2 deletions

View File

@ -435,7 +435,7 @@ static int database_info_iterate_serial_lookup(
db_state->serial, db_info_entry->serial, db_info_entry->name);
#endif
if (!strcmp(db_state->serial, db_info_entry->serial))
database_info_list_iterate_found_match(db_state, db, NULL);
return database_info_list_iterate_found_match(db_state, db, NULL);
}
}

View File

@ -111,7 +111,7 @@ static ssize_t get_token(RFILE *fd, char *token, size_t max_len)
static int find_token(RFILE *fd, const char *token)
{
int tmp_len = strlen(token);
char *tmp_token = (char*)calloc(tmp_len, 1);
char *tmp_token = (char*)calloc(tmp_len+1, 1);
if (!tmp_token)
return -1;
@ -122,6 +122,8 @@ static int find_token(RFILE *fd, const char *token)
return -1;
}
free(tmp_token);
return 0;
}