Skip to content
Snippets Groups Projects
Commit 84ec6b68 authored by Richard Cordovano's avatar Richard Cordovano
Browse files

Merge remote-tracking branch 'sam/hashdb_sqlite' into tags_and_hashes

parents fcf4c20e 3946aa12
Branches
No related tags found
No related merge requests found
......@@ -478,7 +478,23 @@ JNIEXPORT jstring JNICALL
return env->NewStringUTF(none);
} else {
TSK_HDB_INFO * db = m_hashDbs.at(dbHandle-1);
if((db != NULL) && (db->idx_info != NULL)) {
if (db == NULL) {
setThrowTskCoreError(env, "Invalid database");
return env->NewStringUTF(none);
}
///@todo there isn't a db type for this (would be needed to get legacy index filename)
/*if(db->db_type == TSK_HDB_DBTYPE_NSRL_SHA1_ID) {
db->hash_type = TSK_HDB_HTYPE_SHA1_ID;
}*/
//else {
db->hash_type = TSK_HDB_HTYPE_MD5_ID;
//}
// Call setup to populate the idx_info struct so we can get the filename
tsk_hdb_idxsetup(db, db->hash_type);
if(db->idx_info != NULL) {
snprintf(cpath, 1024, "%" PRIttocTSK, db->idx_info->idx_fname);
jstring jname = env->NewStringUTF(cpath);
return jname;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment