micropython/tests/unix
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
..
extra_coverage.py tests: Convert remaining "sys.exit()" to "raise SystemExit". 2017-06-10 20:34:38 +03:00
extra_coverage.py.exp py/vstr: Raise a RuntimeError if fixed vstr buffer overflows. 2017-09-21 20:29:41 +10:00
ffi_callback.py tests: Convert remaining "sys.exit()" to "raise SystemExit". 2017-06-10 20:34:38 +03:00
ffi_callback.py.exp tests: Add testcase for ffi callbacks. 2014-12-15 02:18:54 +02:00
ffi_float.py tests: Convert remaining "sys.exit()" to "raise SystemExit". 2017-06-10 20:34:38 +03:00
ffi_float.py.exp tests/ffi_float: Split tgammaf() testcase to a separate test. 2015-08-29 17:24:29 +03:00
ffi_float2.py tests: Convert remaining "sys.exit()" to "raise SystemExit". 2017-06-10 20:34:38 +03:00
ffi_float2.py.exp tests/ffi_float: Split tgammaf() testcase to a separate test. 2015-08-29 17:24:29 +03:00