Fix possible null assignment to non-nullable entities.

This commit is contained in:
2023-10-04 09:55:17 +01:00
parent 2a6e052a62
commit bc8bf7a2dc
27 changed files with 55 additions and 36 deletions

View File

@@ -571,6 +571,11 @@ public sealed partial class Udif
}
buffer = new byte[SECTOR_SIZE];
// Shall not happen
if(data is null)
return ErrorNumber.InvalidArgument;
Array.Copy(data, relOff, buffer, 0, SECTOR_SIZE);
if(_sectorCache.Count >= MAX_CACHED_SECTORS)