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 52d48fa commit c0a1b71
Showing 1 changed file with 1 addition and 0 deletions.
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 c0a1b71

Please sign in to comment.