circuitpython/ports/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
..
coverage-frzmpy ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
coverage-frzstr ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
modules all: Update Makefiles and others to build with new ports/ dir layout. 2017-09-06 14:09:13 +10:00
.gitignore ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
Makefile all: Update Makefiles and others to build with new ports/ dir layout. 2017-09-06 14:09:13 +10:00
alloc.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
coverage.c py/vstr: Raise a RuntimeError if fixed vstr buffer overflows. 2017-09-21 20:29:41 +10:00
fatfs_port.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
fdfile.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
file.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
gccollect.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
input.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
input.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
main.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
modffi.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
modjni.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
modmachine.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
modos.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
modsocket.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
modtermios.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
modtime.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
moduos_vfs.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
moduselect.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
mpconfigport.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
mpconfigport.mk ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
mpconfigport_coverage.h py/runtime: Implement dispatch for "reverse op" special methods. 2017-09-10 17:05:57 +03:00
mpconfigport_fast.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
mpconfigport_freedos.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
mpconfigport_minimal.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
mpconfigport_nanbox.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
mphalport.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
mpthreadport.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
mpthreadport.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
qstrdefsport.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
unix_mphal.c ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00