Skip to content

Commit

Permalink
disk: check for null pointer when writing through fak_o (#548)
Browse files Browse the repository at this point in the history
#547 was not quite enough to get `~binnec-dozzod-marzod` back online.
This one is. Thanks to @mopfel-winrux for the solution.
  • Loading branch information
pkova authored Nov 8, 2023
2 parents 78ea546 + 582edbc commit 7e3660a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/vere/disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,9 @@ u3_disk_read_meta(MDB_env* mdb_u,
}
}
else if ( (1 == val_u.hav_i) || !((*val_u.buf_y) >> 1) ) {
*fak_o = (*val_u.buf_y) & 1;
if ( fak_o ) {
*fak_o = (*val_u.buf_y) & 1;
}
}
else {
fprintf(stderr, "disk: read meta: invalid fake bit %u %zd\r\n",
Expand Down

0 comments on commit 7e3660a

Please sign in to comment.