Permalink
Browse files

Merge pull request #1374 from JordyZomer/develop

Fix CVE-2018-19497.
  • Loading branch information...
bcarrier committed Nov 29, 2018
2 parents 193ee68 + 8242588 commit bc04aa017c0bd297de8a3b7fc40ffc6ddddbb95d
Showing with 3 additions and 2 deletions.
  1. +3 −2 tsk/fs/hfs.c
@@ -956,11 +956,12 @@ hfs_cat_traverse(HFS_INFO * hfs,
key = (hfs_btree_key_cat *) & node[rec_off];
keylen = 2 + tsk_getu16(hfs->fs_info.endian, key->key_len);
if ((keylen) > nodesize) {
if (keylen >= nodesize - rec_off) {
tsk_error_set_errno(TSK_ERR_FS_GENFS);
tsk_error_set_errstr
("hfs_cat_traverse: length of key %d in index node %d too large (%d vs %"
PRIu16 ")", rec, cur_node, keylen, nodesize);
PRIu16 ")", rec, cur_node, keylen, (nodesize - rec_off));
free(node);
return 1;
}

0 comments on commit bc04aa0

Please sign in to comment.