浏览代码

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 9 年前
父节点
当前提交
05965b5218
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      SerialFlashDirectory.cpp

+ 1
- 1
SerialFlashDirectory.cpp 查看文件

// last check, if enough space exists... // last check, if enough space exists...
len = strlen(filename); len = strlen(filename);
// TODO: check for enough string space for filename // TODO: check for enough string space for filename
uint8_t id[3];
uint8_t id[5];
SerialFlash.readID(id); SerialFlash.readID(id);
if (address + length > SerialFlash.capacity(id)) return false; if (address + length > SerialFlash.capacity(id)) return false;



正在加载...
取消
保存