From d753f942ec12e6b5b2db73698aa6c55588053d3a Mon Sep 17 00:00:00 2001 From: Jean-Jacques Hiblot Date: Fri, 15 Sep 2017 12:57:28 +0200 Subject: lzo: add a function to check the validity of the header Signed-off-by: Jean-Jacques Hiblot Reviewed-by: Tom Rini Reviewed-by: Simon Glass --- include/linux/lzo.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/linux/lzo.h b/include/linux/lzo.h index 88687faba10..8981d04f96c 100644 --- a/include/linux/lzo.h +++ b/include/linux/lzo.h @@ -31,6 +31,9 @@ int lzo1x_decompress_safe(const unsigned char *src, size_t src_len, int lzop_decompress(const unsigned char *src, size_t src_len, unsigned char *dst, size_t *dst_len); +/* check if the header is valid (based on magic numbers) */ +bool lzop_is_valid_header(const unsigned char *src); + /* * Return values (< 0 = Error) */ -- cgit v1.2.3