From a3fc33f8fafd4dc262c76efe0bc4972c2e820c9b Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 24 Jun 2015 13:36:40 +0200 Subject: score: Assert proper node size --- cpukit/score/src/chain.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cpukit/score/src/chain.c b/cpukit/score/src/chain.c index f3722fa720..7f7af71706 100644 --- a/cpukit/score/src/chain.c +++ b/cpukit/score/src/chain.c @@ -19,10 +19,9 @@ #include "config.h" #endif -#include -#include #include -#include +#include +#include void _Chain_Initialize( Chain_Control *the_chain, @@ -37,6 +36,8 @@ void _Chain_Initialize( Chain_Node *current = head; Chain_Node *next = starting_address; + _Assert( node_size >= sizeof( *next ) ); + head->previous = NULL; while ( count-- ) { -- cgit v1.2.3