Skip to content

Panic in readHeader() #42

@tyaps

Description

@tyaps

crash_bin.zip

contents: data[tag.Offset:end],

Hello. I run fuzzing tests in my project and discovered, that panic can occur on this line - "slice bounds out of range".

Because the RPM file, that is attached, is generated by fuzzing test, and it is not the "real rpm from real life", I think, the logic of code is correct. But still some check should be added, like

if end > len(data) {
			return nil, fmt.Errorf("failed to parse entry: fail to calculate content length")
		}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions