Page MenuHomeFreeBSD

mkimg: Don't ignore invalid partition offsets
Needs ReviewPublic

Authored by cperciva on Tue, Oct 6, 9:30 PM.

Details

Reviewers
manu
Summary

When handling PART_KIND_FILE, the "error" variable is set to reflect
any errors in parsing the specified offset; but that value is then
overwritten by the return value of image_copyin.

Error out immediately instead. Note that it is not necessary to change
the code in PART_KIND_SIZE which parses the size, since in that case we
do not overwrite the value in "error".

Fixes: 8f3c71c85e5f ("mkimg: Add support for offset if the source is an image")
MFC after: 1 week
Sponsored by: Amazon

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 77782
Build 74665: arc lint + arc unit