Stefan Nikolei
|
eb549bcda3
|
Use Collection expressions and Target-typed new
1. Collection expressions (`[]` syntax) replacing `new List<T>()`, `new T[] {}`, `.ToArray()`, etc.
2. Target-typed `new()` expressions where appropriate
3. Using spread elements (`[.. collection]`) instead of `.ToArray()` and `.Concat().ToArray()`
4. Adding `#pragma warning disable/restore CS0649` for intentionally unassigned struct fields
|
2 weeks ago |
Sven Claesson
|
c795d81404
|
Fix integer overflow and bounds-checking vulnerabilities in EXR decoder (#3126)
* Fix integer overflow and bounds-checking vulnerabilities in EXR decoder
Use ulong arithmetic in CalculateBytesPerRow and block size calculations
to prevent integer overflow. Add validation for DataWindow dimensions,
block size limits, and row offsets outside stream bounds.
* Harden EXR row offset validation
* EXR: validate sizes, prevent overflows, dispose image
---------
Co-authored-by: James Jackson-South <james_south@hotmail.com>
|
4 months ago |