Skip to content

Commit

Permalink
wt-status-deserialize: fix crash when -v is used
Browse files Browse the repository at this point in the history
Fix crash in `git status -v` by setting `des_s->repo`
to a non-null value.

Upstream changes to eliminate use of `the_repository`
added a `repo` field to `struct status`.  And calls in
`wt-status.c` to `repo_init_revisions()` were changed
to pass `s->repo` rather than `the_repository`.

The status deserialization code was not updated to
actually set `s->repo` before common code passed the
value to OID routines.

This caused a segfault when verbose output was requested.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
  • Loading branch information
jeffhostetler authored and vdye committed Jul 19, 2023
1 parent ec2cef5 commit a1081b4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions wt-status-deserialize.c
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,7 @@ static int wt_deserialize_fd(const struct wt_status *cmd_s, struct wt_status *de
/*
* Copy over display-related fields from the current command.
*/
des_s->repo = cmd_s->repo;
des_s->verbose = cmd_s->verbose;
/* amend */
/* whence */
Expand Down

0 comments on commit a1081b4

Please sign in to comment.