8000 Slice bounds out of range bug · Issue #1 · extrame/ole2 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Slice bounds out of range bug #1
Open
@Kleissner

Description

@Kleissner

The code uses d.Bsize without checking if it's within the range of the slice d.NameBts. A specially crafted ole2 file (Excel sheet) can crash the application by setting a a high number for d.Bsize.

ole2/dir.go

Lines 32 to 35 in d694296

func (d *File) Name() string {
runes := utf16.Decode(d.NameBts[:d.Bsize/2-1])
return string(runes)
}

The fix is to check the ranges first.

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

      0