mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-09-24 13:23:40 +08:00
#6 improve organisation of cff related classes. add failing font test for cff font file. fix bugs with cff parsing
This commit is contained in:
@@ -21,6 +21,11 @@ namespace UglyToad.PdfPig.Fonts.CompactFontFormat
|
||||
throw new InvalidOperationException($"Negative object length {length} at {i}. Current position: {data.Position}.");
|
||||
}
|
||||
|
||||
if (length > data.Length)
|
||||
{
|
||||
throw new InvalidOperationException($"Attempted to read data of length {length} in data array of length {data.Length}.");
|
||||
}
|
||||
|
||||
results[i] = data.ReadBytes(length);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user