Skip to content

Version byte validation unsafe #7

@xayaank

Description

@xayaank

raw[len(MAGIC):len(HEADER)]
, Assuming raw is long enough

If raw shorter than 5 bytes = incorrect slicing instead of clean error

FIX:
if len(raw) < len(HEADER):
raise ValueError("Truncated header.")

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions