Skip to content
Snippets Groups Projects
Commit 80fb88ae authored by Richard Cordovano's avatar Richard Cordovano Committed by GitHub
Browse files

Merge pull request #991 from APriestman/3159_addNullToHashStr

Make sure digits string is null terminated
parents da4a1738 d0270aad
No related branches found
No related tags found
No related merge requests found
...@@ -871,6 +871,7 @@ static uint8_t ...@@ -871,6 +871,7 @@ static uint8_t
// corresponding set. // corresponding set.
TSK_OFF_T idx_off = hdb_binsrch_info->idx_off; TSK_OFF_T idx_off = hdb_binsrch_info->idx_off;
char digits[4]; char digits[4];
digits[3] = '\0';
long int offsets_idx = 0; long int offsets_idx = 0;
while (fgets(hdb_binsrch_info->idx_lbuf, (int)hdb_binsrch_info->idx_llen + 1, hdb_binsrch_info->hIdx)) { while (fgets(hdb_binsrch_info->idx_lbuf, (int)hdb_binsrch_info->idx_llen + 1, hdb_binsrch_info->hIdx)) {
strncpy(digits, hdb_binsrch_info->idx_lbuf, 3); strncpy(digits, hdb_binsrch_info->idx_lbuf, 3);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment