micropython/ports
Damien George ede8a0235b py/vstr: Raise a RuntimeError if fixed vstr buffer overflows.
Current users of fixed vstr buffers (building file paths) assume that there
is no overflow and do not check for overflow after building the vstr.  This
has the potential to lead to NULL pointer dereferences
(when vstr_null_terminated_str returns NULL because it can't allocate RAM
for the terminating byte) and stat'ing and loading invalid path names (due
to the path being truncated).  The safest and simplest thing to do in these
cases is just raise an exception if a write goes beyond the end of a fixed
vstr buffer, which is what this patch does.  It also simplifies the vstr
code.
2017-09-21 20:29:41 +10:00
..
bare-arm all: Update Makefiles and others to build with new ports/ dir layout. 2017-09-06 14:09:13 +10:00
cc3200 py/builtinhelp: Change signature of help text var from pointer to array. 2017-09-12 16:03:52 +10:00
esp8266 py/builtinhelp: Change signature of help text var from pointer to array. 2017-09-12 16:03:52 +10:00
minimal all: Update Makefiles and others to build with new ports/ dir layout. 2017-09-06 14:09:13 +10:00
pic16bit all: Update Makefiles and others to build with new ports/ dir layout. 2017-09-06 14:09:13 +10:00
qemu-arm tests/class_reverse_op: Test for reverse arith ops special methods. 2017-09-10 17:05:57 +03:00
stm32 stm32/usbdev: Change static function variable to non-static. 2017-09-20 17:45:21 +10:00
teensy py/builtinhelp: Change signature of help text var from pointer to array. 2017-09-12 16:03:52 +10:00
unix py/vstr: Raise a RuntimeError if fixed vstr buffer overflows. 2017-09-21 20:29:41 +10:00
windows all: Update Makefiles and others to build with new ports/ dir layout. 2017-09-06 14:09:13 +10:00
zephyr py/builtinhelp: Change signature of help text var from pointer to array. 2017-09-12 16:03:52 +10:00