Fix buffer use in DataObject
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
https://github.com/dotnet/wpf/blob/1d4abe6b45ed1a1e9fe605ae1c9949d6d2a99fb4/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/dataobject.cs#L1670
The actual bytes read are ignored, instead a constant is used in the following line to specify the amount of bytes to read, even if the actual amount of bytes may be lower.
https://github.com/dotnet/wpf/blob/1d4abe6b45ed1a1e9fe605ae1c9949d6d2a99fb4/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/dataobject.cs#L1672
I do not know if it is easily possible to trigger, but this definitely seems incorrect. Also, as far as I can tell the pointer is a constant and could be hoisted so that it does not need to be converted multiple times.
Contributor guide
Assessment
This issue has not been assessed yet.