Skip to content

MemoryStream Set: incorrect get size and write to buffer causes exception (C# generator) #71

Closed
@BlackTr

Description

@BlackTr

E.g. we have input stream with Length = 100 and Capacity = 1000.

public override void Set(MemoryStream value)
...
uint fbeBytesSize = (uint)value.Length; // here we have 100
...
Write(fbeBytesOffset + 4, value.GetBuffer()); // and trying to write 1000

Proposed solution (to c# generator)?

 Write(fbeBytesOffset + 4, value.GetBuffer(), 0, fbeBytesSize);

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