Skip to content

Safer hostkey lookup in siafile

Christopher Schinnerl requested to merge saver-hostkey-lookup into master

If a siafile corrupts for some reason and the hostkeytable offset within a piece does no longer match an existing offset siad crashes with an index-out-of-bounds error. To avoid that this MR introduces a safer getter method for hostkeys which is used whenever possible. If a piece points to a non-existent offset, the table is extended with dummy hosts to avoid a crash.

Edited by Christopher Schinnerl

Merge request reports