Fix a corner case buffer access issue when records are skipped.
@@ -161,12 +161,7 @@ restart:
omf_set_rh_flags(rhdr, flags);
}
- if (skiprec) { /* go to next record */
- prev_foff = foff;
- foff += (rhlen + omf_rh_len(rhdr));
- continue;
- }
-
+ if (!skiprec) {
/* Mark flush boundary on encountering a gen increase */
rgen = omf_rh_gen(rhdr);
if (cgen > 0 && rgen > cgen)
@@ -188,6 +183,7 @@ restart:
/* Determine min/max txid from tx meta record */
wal_buffer_minmax_txid(buf, rtype, &info);
+ }
prev_foff = foff;
foff += (rhlen + omf_rh_len(rhdr));
