Lucene search
+L

2 matches found

Code423n4
Code423n4
added 2023/12/21 12:0 a.m.16 views

MaxHeapify: find children with large value and swap

Lines of code Vulnerability details Input Validation: - The maxHeapify function assumes that pos is a valid position within the heap. - Similar to the swap function, you should consider adding a check to verify that pos is within the bounds of your heap. requirepos size, "Invalid position...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/12/21 12:0 a.m.28 views

Incorrect Termination Condition

Lines of code Vulnerability details The provided termination condition if pos = size / 2 && pos = size is incorrect. This condition is not suitable for terminating the maxHeapify function. It should instead be based on comparing values in the heap to ensure the max heap property. The condition if...

7.2AI score
SaveExploits0
Rows per page
Query Builder