Skip to content

Doesn't write the end of the input file in some cases #20

@julianladisch

Description

@julianladisch

i++ in https://github.com/openSUSE/imagewriter/blob/531d36b/Platform.cpp#L112 causes the end of the input file not to be written in some cases.

How to reproduce:

# write 3 MB plus 1 byte of zeroes
sudo dd if=/dev/zero of=/dev/sdb bs=3145729 count=1
# create 3 MB containing \xaa\x55 and 1 byte with character a
printf %3145728sa | sed 's/  /\xaa\x55/g' > a.iso
imagewriter -d /dev/sdb -f a.iso
# read the byte after 3 MB
sudo dd status=none if=/dev/sdb bs=1 skip=3145728 count=1

Expected result: a
The actual result is a null byte.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions