diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2021-10-06 21:48:22 +0200 |
|---|---|---|
| committer | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2021-10-06 21:48:22 +0200 |
| commit | 8fcd1794a676610f838bc00b754f80830d6c6e50 (patch) | |
| tree | 390a43d279fbf3938522e65a8b98b13cecb2cf25 /core/image/common.odin | |
| parent | 9b5ae9567790d0f340d6ef56ff993e39f0b4873a (diff) | |
png: Add sane compile-time maximums for dimensions + chunk sizes.
Diffstat (limited to 'core/image/common.odin')
| -rw-r--r-- | core/image/common.odin | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/image/common.odin b/core/image/common.odin index 9bb99a5d4..2826a65ca 100644 --- a/core/image/common.odin +++ b/core/image/common.odin @@ -1,13 +1,12 @@ -package image - /* Copyright 2021 Jeroen van Rijn <nom@duclavier.com>. - Made available under Odin's BSD-2 license. + Made available under Odin's BSD-3 license. List of contributors: Jeroen van Rijn: Initial implementation, optimization. Ginger Bill: Cosmetic changes. */ +package image import "core:bytes" import "core:mem" @@ -128,6 +127,7 @@ Error :: union { General_Image_Error :: enum { None = 0, Invalid_Image_Dimensions, + Image_Dimensions_Too_Large, Image_Does_Not_Adhere_to_Spec, } @@ -138,6 +138,7 @@ PNG_Error :: enum { IDAT_Missing, IDAT_Must_Be_Contiguous, IDAT_Corrupt, + IDAT_Size_Too_Large, PLTE_Encountered_Unexpectedly, PLTE_Invalid_Length, TRNS_Encountered_Unexpectedly, |