mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-01 12:24:14 +01:00
parent
fa04bd7323
commit
be936dd590
@ -1,4 +1,9 @@
|
|||||||
|
|
||||||
|
ARDUINO 1.5.5 BETA
|
||||||
|
|
||||||
|
[libraries]
|
||||||
|
* avr: Fixed buffer overflow in File::doBuffer() (dreggy)
|
||||||
|
|
||||||
ARDUINO 1.5.4 BETA 2013.09.10
|
ARDUINO 1.5.4 BETA 2013.09.10
|
||||||
|
|
||||||
[ide]
|
[ide]
|
||||||
|
@ -116,10 +116,10 @@ void File::doBuffer() {
|
|||||||
if (buffered > 0)
|
if (buffered > 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Try to buffer up to 32 characters
|
// Try to buffer up to BUFFER_SIZE characters
|
||||||
readPos = 0;
|
readPos = 0;
|
||||||
uint8_t cmd[] = {'G', handle, sizeof(buffer)};
|
uint8_t cmd[] = {'G', handle, BUFFER_SIZE - 1};
|
||||||
buffered = bridge.transfer(cmd, 3, buffer, sizeof(buffer)) - 1;
|
buffered = bridge.transfer(cmd, 3, buffer, BUFFER_SIZE) - 1;
|
||||||
//err = buff[0]; // First byte is error code
|
//err = buff[0]; // First byte is error code
|
||||||
if (buffered>0) {
|
if (buffered>0) {
|
||||||
// Shift the reminder of buffer
|
// Shift the reminder of buffer
|
||||||
|
Loading…
Reference in New Issue
Block a user