Skip to content

Commit

Permalink
vere: fix chop (#599)
Browse files Browse the repository at this point in the history
This fixes a null-pointer write in epoc list function, introduced as
part of a separate fix in #592.
  • Loading branch information
pkova authored Feb 1, 2024
2 parents 1797c59 + ad224d1 commit 0bd7b38
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/vere/disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1342,7 +1342,8 @@ u3_disk_epoc_list(u3_disk* log_u, c3_d* sot_d)
c3_z len_z = 0;

while ( den_u ) { // count epochs
if ( 1 == sscanf(den_u->nam_c, "0i%" PRIc3_d, (sot_d + len_z)) ) {
c3_d tmp_d;
if ( 1 == sscanf(den_u->nam_c, "0i%" PRIc3_d, &tmp_d) ) {
len_z++;
}
den_u = den_u->nex_u;
Expand Down

0 comments on commit 0bd7b38

Please sign in to comment.