Skip to content

Commit

Permalink
Add comment about fix line
Browse files Browse the repository at this point in the history
  • Loading branch information
dmknght committed Oct 27, 2024
1 parent 4beb8cb commit c332041
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/engine/scan_file.nim
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ proc fscanner_check_hidden_node(scan_ctx: var FileScanCtx, ptr_dir: ptr Dirent,
# d_reclen = len(current_node_name) + sizeof(chunk_bytes)
# Casting a string at next position can get the name of next node
if ptr_dir.d_name[ptr_dir.d_reclen] != '\x00':
# Fix heap overflow that cause false positive
next_node_name = $cast[cstring](addr(ptr_dir.d_name[ptr_dir.d_reclen]))
else:
next_node_name = ""
Expand Down

0 comments on commit c332041

Please sign in to comment.