diff options
author | Jean-Jacques Hiblot <jjhiblot@ti.com> | 2017-09-15 12:57:28 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-10-05 21:31:04 -0400 |
commit | d753f942ec12e6b5b2db73698aa6c55588053d3a (patch) | |
tree | 57d7bfdd0f8a8f48267bdea1a39584b84cfa1c33 /include/linux | |
parent | 02035d0086b3f9114463a9b9df38a5618ffe8a04 (diff) | |
download | u-boot-d753f942ec12e6b5b2db73698aa6c55588053d3a.tar.gz u-boot-d753f942ec12e6b5b2db73698aa6c55588053d3a.tar.xz u-boot-d753f942ec12e6b5b2db73698aa6c55588053d3a.zip |
lzo: add a function to check the validity of the header
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/lzo.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/lzo.h b/include/linux/lzo.h index 88687faba1..8981d04f96 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) */ |