diff options
author | Daniel Friesel <derf@finalrewind.org> | 2021-01-20 19:56:03 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2021-01-20 19:56:03 +0100 |
commit | f2433ec891cd269ce24ee286e46859563cdb20d2 (patch) | |
tree | ac85db1acffa8e897acfd5a9a5d52e1ea4363749 /include | |
parent | 4d88a39160bc389b3198bc81b280093beea1790e (diff) |
add some bounds checks
Diffstat (limited to 'include')
-rw-r--r-- | include/lib/udeflate.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/lib/udeflate.h b/include/lib/udeflate.h index e751374..f3b1ff6 100644 --- a/include/lib/udeflate.h +++ b/include/lib/udeflate.h @@ -6,11 +6,12 @@ #include <stdint.h> -#define UDEFLATE_ERR_LENGTH (-1) +#define UDEFLATE_ERR_INPUT_LENGTH (-1) #define UDEFLATE_ERR_METHOD (-2) #define UDEFLATE_ERR_FDICT (-3) #define UDEFLATE_ERR_BLOCK (-4) #define UDEFLATE_ERR_CHECKSUM (-5) +#define UDEFLATE_ERR_OUTPUT_LENGTH (-6) int8_t udeflate(unsigned char *input_buf, uint16_t input_len, unsigned char *output_buf, uint16_t output_len); |