From: LemonBoy Date: Fri, 10 Mar 2017 16:29:47 +0100 Subject: [PATCH] Add bound checking to all srfi-4 vector allocations. Do what C_allocate_vector already does and prevent the creation of a vector that's too big or too small. We should be very careful to avoid the latter case because the allocation size is directly fed into `malloc' as 'x + sizeof(C_header)' thus making possible to successfully allocate a vector smaller than the C_header structure and get C_block_header_init to write over uninitialized memory. To reduce code duplication, type checking is moved from each of the make-*vector procedures to the common "alloc" helper procedure. Signed-off-by: Peter Bex Signed-off-by: Kooda --- srfi-4.scm | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/srfi-4.scm b/srfi-4.scm index 7f5412b..69f58ba 100644 --- a/srfi-4.scm +++ b/srfi-4.scm @@ -255,24 +255,28 @@ EOF ;;
aboutsummaryrefslogtreecommitdiff
ModeNameSize
-rw-r--r--asus-c201.tmpl2266logplainabout
-rw-r--r--bare-bones.tmpl2169logplainabout
-rw-r--r--bare-hurd.tmpl2069logplainabout
-rw-r--r--beaglebone-black.tmpl2260logplainabout
-rw-r--r--