Explorar el Código

SerialFlash: enlarge chip ID buffer

SerialFlashChip::readID() writes up to 5 bytes into
the buffer provided, but the caller only allocates
3 bytes. Increase buffer size to 5 bytes.
main
erik.nyquist hace 8 años
padre
commit
05965b5218
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. +1
    -1
      SerialFlashDirectory.cpp

+ 1
- 1
SerialFlashDirectory.cpp Ver fichero

@@ -310,7 +310,7 @@ bool SerialFlashChip::create(const char *filename, uint32_t length, uint32_t ali
// last check, if enough space exists...
len = strlen(filename);
// TODO: check for enough string space for filename
uint8_t id[3];
uint8_t id[5];
SerialFlash.readID(id);
if (address + length > SerialFlash.capacity(id)) return false;


Cargando…
Cancelar
Guardar