nodemcu-firmware/app
Nathaniel Wesley Filardo 962991ed18 pipe: fix unread buffer chunk management
unread contained two subtle bugs:

 - it created a buffer chunk at pipe[1], when that position is reserved
   for the pipe reader function.  Because it shifted pipe[i] to
   pipe[i+1], including pipe[1], this was likely to manifest as the pipe
   later attempting to dequeue a function rather than a buffer chunk
   user datum.  Solve this by adjusting the loop bounds and creation
   index.

 - when it created a new buffer chunk, it left that chunk's ->start and
   ->end fields at 0, but would then exit the loop to do the tail fill,
   which was in turn assuming the exit condition of the loop when an
   existing chunk had room, namely that data had been moved to the right
   and so ->start > l.  Solve this by making new chunks empty but with
   ->start = ->end = LUAL_BUFFERSIZE.  It may be slightly better to
   instead try to leave room at both ends if the buffer was empty prior
   to this unread.

FIXES: https://github.com/nodemcu/nodemcu-firmware/issues/3155
2020-10-23 04:21:51 +01:00
..
coap Lua 5.1 / 5.3 alignment and document (#3193) 2020-08-22 17:41:02 +01:00
crypto SSL rampage (#2938) 2020-06-09 22:26:06 +02:00
dht Correct negative results in DHT driver (#3210) 2020-08-03 19:58:19 +01:00
driver Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
esp-gdbstub Dev make cleanup (#2842) 2019-07-23 18:47:18 +03:00
fatfs Dev make cleanup (#2842) 2019-07-23 18:47:18 +03:00
http Lua 5.1 / 5.3 alignment and document (#3193) 2020-08-22 17:41:02 +01:00
include add wiegand module (#3203) 2020-10-19 01:05:31 +01:00
libc CLean up the PR a bit 2020-09-27 03:05:36 +01:00
lua First phase of number to integer conversion (#3221) 2020-08-29 17:48:24 +01:00
lua53 Improved startup performance and measurement tools. (#3171) 2020-10-18 20:46:47 +02:00
lwip Networking rampage and accumulated fixes (#3060) 2020-06-09 22:26:52 +02:00
mbedtls tls: fix new verification API 2020-06-09 22:26:52 +02:00
modules pipe: fix unread buffer chunk management 2020-10-23 04:21:51 +01:00
mqtt WIP: MQTT fixes (#2986) 2020-06-09 22:26:52 +02:00
net Dev make cleanup (#2842) 2019-07-23 18:47:18 +03:00
pcm First phase of number to integer conversion (#3221) 2020-08-29 17:48:24 +01:00
platform Improved startup performance and measurement tools. (#3171) 2020-10-18 20:46:47 +02:00
pm Add missing features to Travis CI PR build (#3255) 2020-08-30 21:04:00 +02:00
sjson Dev make cleanup (#2842) 2019-07-23 18:47:18 +03:00
smart Dev make cleanup (#2842) 2019-07-23 18:47:18 +03:00
spiffs Improved startup performance and measurement tools. (#3171) 2020-10-18 20:46:47 +02:00
tsl2561 Dev make cleanup (#2842) 2019-07-23 18:47:18 +03:00
u8g2lib Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
ucglib Dev make cleanup (#2842) 2019-07-23 18:47:18 +03:00
user Fix the initialization of the wifi default hostname. (#3303) 2020-10-18 20:48:10 +02:00
uzlib Dev make cleanup (#2842) 2019-07-23 18:47:18 +03:00
websocket Lua 5.1 / 5.3 alignment and document (#3193) 2020-08-22 17:41:02 +01:00
.gitignore seperate user_config.h to speed-up compile when modules disabled/enabled 2015-03-06 11:59:04 +08:00
Makefile Remove sqlite3 module 2020-06-10 02:14:29 +01:00