Skip to content

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

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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