From 8a14f5930839daa7d21b42774c4b2ab068dbc919 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Wed, 30 Sep 2009 01:48:10 +0000 Subject: [PATCH] [egg] Fix assertion when releasing secure memory block. If a secure memory block was allocated that was not multiple of page size, then on releasing that block, an assertion was raised. The source of the problem was a lack of tracking the actually allocated block size. --- egg/egg-secure-memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/egg/egg-secure-memory.c b/egg/egg-secure-memory.c index 36c4e6a..1153bb0 100644 --- a/egg/egg-secure-memory.c +++ b/egg/egg-secure-memory.c @@ -873,8 +873,8 @@ sec_block_create (size_t size) if (size < DEFAULT_BLOCK_SIZE) size = DEFAULT_BLOCK_SIZE; - block->n_words = size / sizeof (word_t); block->words = sec_acquire_pages (&size); + block->n_words = size / sizeof (word_t); if (!block->words) { pool_free (block); pool_free (cell); -- 2.7.4