WIP: protect against bad values in read_seg_entry