nodemcu-firmware/app/modules
Nathaniel Wesley Filardo a97d8f114c 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-11-07 16:23:43 +01:00
..
enduser_setup Improve the enduser setup experience by triggering captive portal detection. (#3282) 2020-11-07 16:23:43 +01:00
.gitignore Adds support for verifying the certificate offered by an SSL server. 2016-03-09 21:51:23 -05:00
Makefile Dev make cleanup (#2842) 2019-07-23 18:47:18 +03:00
adc.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
ads1115.c ads1115 minor cleanup 2020-06-17 23:50:31 +01:00
adxl345.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
am2320.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
apa102.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
bit.c First phase of number to integer conversion (#3221) 2020-08-29 17:48:24 +01:00
bloom.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
bme280.c bme280 driver in Lua+C 2020-11-07 16:23:43 +01:00
bme280_math.c bme280 driver in Lua+C 2020-11-07 16:23:43 +01:00
bme680.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
bme680_defs.h Update sensor driver for BME680 to 3.5.9 (#2969) 2020-06-09 22:26:06 +02:00
bmp085.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
coap.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
color_utils.c First phase of number to integer conversion (#3221) 2020-08-29 17:48:24 +01:00
color_utils.h Major cleanup - c_whatever is finally history. (#2838) 2019-07-22 00:58:21 +03:00
cron.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
crypto.c crypto: remove toHex and toBase64 (#3300) 2020-11-07 16:23:43 +01:00
dcc.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
dht.c First phase of number to integer conversion (#3221) 2020-08-29 17:48:24 +01:00
encoder.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
enduser_setup.c Improve the enduser setup experience by triggering captive portal detection. (#3282) 2020-11-07 16:23:43 +01:00
file.c Improved startup performance and measurement tools. (#3171) 2020-11-07 16:23:43 +01:00
gdbstub.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
gpio.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
gpio_pulse.c Guard against freeing a ref of zero (#3308) 2020-11-07 16:23:43 +01:00
hdc1080.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
hmc5883l.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
http.c First phase of number to integer conversion (#3221) 2020-08-29 17:48:24 +01:00
hx711.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
i2c.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
l3g4200d.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
mcp4725.c First phase of number to integer conversion (#3221) 2020-08-29 17:48:24 +01:00
mdns.c First phase of number to integer conversion (#3221) 2020-08-29 17:48:24 +01:00
mqtt.c mqtt: fix connfail callback 2020-08-11 17:20:17 +01:00
net.c Remove some uses of etc_*printf 2020-11-07 16:23:43 +01:00
net_ping.c net_info module - ping function (#2854) 2020-06-09 22:26:52 +02:00
net_ping.h net_info module - ping function (#2854) 2020-06-09 22:26:52 +02:00
node.c Improved startup performance and measurement tools. (#3171) 2020-11-07 16:23:43 +01:00
ow.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
pcm.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
perf.c First phase of number to integer conversion (#3221) 2020-08-29 17:48:24 +01:00
pipe.c pipe: fix unread buffer chunk management 2020-11-07 16:23:43 +01:00
pwm.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
pwm2.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
rfswitch.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
rotary.c First phase of number to integer conversion (#3221) 2020-08-29 17:48:24 +01:00
rtcfifo.c First phase of number to integer conversion (#3221) 2020-08-29 17:48:24 +01:00
rtcmem.c First phase of number to integer conversion (#3221) 2020-08-29 17:48:24 +01:00
rtctime.c Add support to set the clock rate and have sntp use it. (#3236) 2020-08-08 13:32:14 +02:00
si7021.c First phase of number to integer conversion (#3221) 2020-08-29 17:48:24 +01:00
sigma_delta.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
sjson.c Make it work for the integer lua51 build 2020-11-07 16:23:43 +01:00
sntp.c First phase of number to integer conversion (#3221) 2020-08-29 17:48:24 +01:00
softuart.c SoftUART module fixes and code simplification (#3104) 2020-09-04 17:02:33 +02:00
somfy.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
spi.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
struct.c Change struct & sjson to use integers. This is slightly more complex (#3222) 2020-08-23 23:11:18 +01:00
switec.c First phase of number to integer conversion (#3221) 2020-08-29 17:48:24 +01:00
tcs34725.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
tls.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
tm1829.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
tmr.c Fixes broken `tmr.alarm` (#3263) 2020-09-05 14:16:57 +02:00
tsl2561.c First phase of number to integer conversion (#3221) 2020-08-29 17:48:24 +01:00
u8g2.c u8g2: Fix name of updateDisplay export (#3093) 2020-06-09 22:26:52 +02:00
uart.c uart: expose fifo depth counters (#3177) 2020-11-07 16:23:43 +01:00
ucg.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
websocket.c First phase of number to integer conversion (#3221) 2020-08-29 17:48:24 +01:00
wiegand.c wiegand Lua 5.3 fix 2020-11-07 16:23:43 +01:00
wifi.c Fix the initialization of the wifi default hostname. (#3303) 2020-11-07 16:23:43 +01:00
wifi_common.c Major cleanup - c_whatever is finally history. (#2838) 2019-07-22 00:58:21 +03:00
wifi_common.h Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
wifi_eventmon.c First phase of number to integer conversion (#3221) 2020-08-29 17:48:24 +01:00
wifi_monitor.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
wps.c Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +01:00
ws2801.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00
ws2812.c First phase of number to integer conversion (#3221) 2020-08-29 17:48:24 +01:00
ws2812.h Fixes for `ws2812` and `ws2812_effects` (#2953) 2020-06-09 22:26:06 +02:00
ws2812_effects.c First phase of number to integer conversion (#3221) 2020-08-29 17:48:24 +01:00
xpt2046.c Squashed updates do get Lua51 and Lua53 working (#3075) 2020-06-09 22:26:52 +02:00