From 7ab237b025cbb4c25d345604da32e894379c1721 Mon Sep 17 00:00:00 2001 From: Marcin Bukat Date: Thu, 9 Jan 2014 21:37:07 +0100 Subject: buflib: Add crc field protecting buflib cookie integrity This should catch the case of buffer misuse which results in corrupted cookie of next allocation. The check is performed on move_block() so it may be a bit late. There is buflib_check_valid() provided which checks the integrity of all cookies for given context. On DEBUG build with --sdl-thread this check is carried out for core_ctx on every context switch to catch problems earlier. Change-Id: I999d4576084592394e3dbd3bdf0f32935ff5f601 Reviewed-on: http://gerrit.rockbox.org/711 Reviewed-by: Thomas Martitz --- apps/plugin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/plugin.h') diff --git a/apps/plugin.h b/apps/plugin.h index 8a0d0562ff..1d1e9ee26e 100644 --- a/apps/plugin.h +++ b/apps/plugin.h @@ -457,7 +457,7 @@ struct plugin_api { int numberlen IF_CNFN_NUM_(, int *num)); bool (*file_exists)(const char *file); char* (*strip_extension)(char* buffer, int buffer_size, const char *filename); - unsigned (*crc_32)(const void *src, unsigned len, unsigned crc32); + uint32_t (*crc_32)(const void *src, uint32_t len, uint32_t crc32); int (*filetype_get_attr)(const char* file); -- cgit v1.2.3