Skip to content

Commit

Permalink
Fix segfault in process ancestry code
Browse files Browse the repository at this point in the history
The current pointer would end up pointing to a freed block if realloc
had to move the process list.
  • Loading branch information
dra27 committed Nov 7, 2023
1 parent 074b4c9 commit 9ec78ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion master_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ users)
## Internal

## Internal: Windows
* Fix sporadic crash in shell detection (seen in native containers) [#5714 @dra27]
* Fix sporadic crash and segfault in shell detection (seen in native containers) [#5714 @dra27]

## Test

Expand Down
1 change: 1 addition & 0 deletions src/stubs/win32/opamWindows.c
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,7 @@ CAMLprim value OPAMW_GetProcessAncestry(value unit)
read_entry = FALSE;
break;
} else {
cur = ptr + (cur - processes);
processes = ptr;
}
}
Expand Down

0 comments on commit 9ec78ae

Please sign in to comment.