Skip to content

Make FileHeader structure safe to read/write froma a binary file. #2

@plamenko

Description

@plamenko

FileHeader structure is read directly from a binary file. Right now this is vulnerable as the structure members are int which size needs not to be 32bits.

Likewise for the structure alignement and padding. Compiler may choose to align members and pad the structure as it wishes unless spefiied otherwise.

See struct-padding-in-c.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions