Page MenuHomeFreeBSD

loader: ptable_open() check for ptable_cd9660read result is wrong
ClosedPublic

Authored by tsoome on Nov 7 2018, 1:50 PM.

Details

Summary

bug 232483

The ptable_*read() functions return NULL on read errors (and partition table
closed as an side effect). The ptable_open must check the return value and
act properly.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

tsoome created this revision.Nov 7 2018, 1:50 PM
cem accepted this revision.Nov 7 2018, 7:23 PM
This revision is now accepted and ready to land.Nov 7 2018, 7:23 PM
lev added a comment.Nov 7 2018, 9:15 PM

This helps. It doen't show BSD partitions, but shows all four MBR slices without crash.

tsoome added a comment.Nov 7 2018, 9:19 PM
In D17890#382275, @lev wrote:

This helps. It doen't show BSD partitions, but shows all four MBR slices without crash.

Yes, because even the gpart does not list the partition types there (!0), so the loader part.c does not have knowledge about such layout. But thats another issue:)

This revision was automatically updated to reflect the committed changes.