summaryrefslogtreecommitdiff
path: root/include/lib
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-01-20 19:56:03 +0100
committerDaniel Friesel <derf@finalrewind.org>2021-01-20 19:56:03 +0100
commitf2433ec891cd269ce24ee286e46859563cdb20d2 (patch)
treeac85db1acffa8e897acfd5a9a5d52e1ea4363749 /include/lib
parent4d88a39160bc389b3198bc81b280093beea1790e (diff)
add some bounds checks
Diffstat (limited to 'include/lib')
-rw-r--r--include/lib/udeflate.h3
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);