Skip to content

Commit

Permalink
disk: check for null pointer when writing through fak_o
Browse files Browse the repository at this point in the history
  • Loading branch information
pkova authored Nov 8, 2023
1 parent 78ea546 commit 582edbc
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 582edbc

Please sign in to comment.