Commit 773403a
committed
Fix nil pointer dereference in xray command
This commit fixes a nil pointer dereference in the xray command that
occurs when analyzing some Docker images. The crash was caused by the
`List` function modifying the heap while iterating over it.
The fix modifies the `List` function to create a new heap and pop items
from the new heap. This prevents the heap from being modified while it's
being iterated over.1 parent a303c88 commit 773403a
1 file changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
58 | 63 | | |
59 | 64 | | |
60 | 65 | | |
| |||
0 commit comments