summaryrefslogtreecommitdiffstatshomepage
path: root/docs/esp8266/tutorial/network_basics.rst
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-09-01 08:05:24 +1000
committerDamien George <damien.p.george@gmail.com>2017-09-21 20:29:41 +1000
commitede8a0235b47333aaaa8d03a3b9e20b014be3808 (patch)
tree01649ce7f532e1453e46d0d2b03cf36c8f835b94 /docs/esp8266/tutorial/network_basics.rst
parent7885a425d78a5a2fa7da5099cdd547a35f5e69dd (diff)
downloadmicropython-ede8a0235b47333aaaa8d03a3b9e20b014be3808.tar.gz
micropython-ede8a0235b47333aaaa8d03a3b9e20b014be3808.zip
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.
Diffstat (limited to 'docs/esp8266/tutorial/network_basics.rst')
0 files changed, 0 insertions, 0 deletions