summaryrefslogtreecommitdiff
path: root/include/compress.h
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-05-04 15:32:52 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-05-04 22:22:48 +0200
commit2b975a449c17268f943403176a7609079b7af084 (patch)
treefee51e2f4b4f424c9a55dc35fb7aad21e3ce6580 /include/compress.h
parent6f7ee71165b30272a4f18bca361c324c7671680c (diff)
Remove compressor internal buffers
Pass in an external destination buffer + size and allow for propper bounds checking (especially when unpacking). Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include/compress.h')
-rw-r--r--include/compress.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/compress.h b/include/compress.h
index d527307..ad193e8 100644
--- a/include/compress.h
+++ b/include/compress.h
@@ -12,7 +12,8 @@
typedef struct compressor_t compressor_t;
struct compressor_t {
- ssize_t (*do_block)(compressor_t *cmp, uint8_t *block, size_t outsize);
+ ssize_t (*do_block)(compressor_t *cmp, const uint8_t *in, size_t size,
+ uint8_t *out, size_t outsize);
void (*destroy)(compressor_t *stream);
};