chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-hackers] [PATCH] Prevent uninitialized memory access when make-


From: lemonboy
Subject: [Chicken-hackers] [PATCH] Prevent uninitialized memory access when make-ing a srfi-4 vector
Date: Fri, 10 Mar 2017 16:36:25 +0100

Hello hackers,
during one hell of a trip trough the srfi-4 code I noticed that a
check was missing when
we try to allocate a srfi-4 vector on the heap.
You can see by yourself that `(make-u8vector -7 #f #t)' (on a 64-bit
platform) ends up
malloc-ing a 1-byte buffer and then calls C_block_header_init on it,
writing over a chunk
of memory that's over the buffer end.
Attached is a patch against the chicken-5 branch, I think it should
apply cleanly to the
4.x branch too.

Cheers,
LemonBoy

Attachment: 0001-Add-bound-checking-to-the-external-vector-allocation.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]